Index: head/x11/xfce4-taskmanager/Makefile =================================================================== --- head/x11/xfce4-taskmanager/Makefile (revision 479931) +++ head/x11/xfce4-taskmanager/Makefile (revision 479932) @@ -1,38 +1,39 @@ # Created by: DaJoob # $FreeBSD$ PORTNAME= xfce4-taskmanager PORTVERSION= 1.2.1 +PORTREVISION= 1 CATEGORIES= x11 xfce MASTER_SITES= XFCE/src/apps/${PORTNAME}/${PORTVERSION:R} DIST_SUBDIR= xfce4 MAINTAINER= xfce@FreeBSD.org COMMENT= Task manager for the Xfce desktop LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 GNU_CONFIGURE= yes USES= gettext-tools gmake localbase pkgconfig tar:bzip2 USE_GNOME= glib20 cairo gdkpixbuf2 intltool libwnck USE_XORG= ice sm x11 xmu xt INSTALLS_ICONS= yes CONFIGURE_ARGS+= --disable-silent-rules --disable-gksu \ --disable-wnck3 --enable-wnck OPTIONS_DEFINE= GTK3 NLS OPTIONS_SUB= yes GTK3_CONFIGURE_ENABLE= gtk3 GTK3_USE= GNOME=gtk30 GTK3_USE_OFF= GNOME=gtk20 NLS_CONFIGURE_ENABLE= nls NLS_USES= gettext-runtime .include Index: head/x11/xfce4-taskmanager/files/patch-af078d4 =================================================================== --- head/x11/xfce4-taskmanager/files/patch-af078d4 (nonexistent) +++ head/x11/xfce4-taskmanager/files/patch-af078d4 (revision 479932) @@ -0,0 +1,74 @@ +From af078d406a43243388e0a61d647c3a6b7ada60ed Mon Sep 17 00:00:00 2001 +From: rim +Date: Thu, 21 Jun 2018 12:10:15 +0300 +Subject: Improve app search on close (bug 14466) + +--- + src/app-manager.c | 25 ++++++++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/src/app-manager.c b/src/app-manager.c +index 5092e00..b2bdb0c 100644 +--- src/app-manager.c ++++ src/app-manager.c +@@ -44,6 +44,7 @@ static gint app_pid_compare_fn (gconstpointer a, gconstpointer b); + static void apps_add_application (GArray *apps, WnckApplication *application, GPid pid); + static void apps_remove_application (GArray *apps, WnckApplication *application); + static App * apps_lookup_pid (GArray *apps, GPid pid); ++static App * apps_lookup_app (GArray *apps, WnckApplication *application); + static void application_opened (WnckScreen *screen, WnckApplication *application, XtmAppManager *manager); + static void application_closed (WnckScreen *screen, WnckApplication *application, XtmAppManager *manager); + +@@ -97,12 +98,17 @@ static GPid + app_get_pid(WnckApplication *application) + { + GPid pid; ++ GList *windows; ++ + if (NULL == application) + return (0); + pid = wnck_application_get_pid (application); + if (pid != 0) + return (pid); +- return (wnck_window_get_pid (WNCK_WINDOW (wnck_application_get_windows (application)->data))); ++ windows = wnck_application_get_windows (application); ++ if (NULL != windows && NULL != windows->data) ++ return (wnck_window_get_pid (WNCK_WINDOW (windows->data))); ++ return (0); + } + + static gint +@@ -134,6 +140,8 @@ apps_remove_application (GArray *apps, WnckApplication *application) + { + App *app = apps_lookup_pid(apps, app_get_pid (application)); + ++ if (app == NULL) ++ app = apps_lookup_app(apps, application); + if (app == NULL) + return; + g_object_unref (app->icon); +@@ -150,6 +158,21 @@ apps_lookup_pid (GArray *apps, GPid pid) + return (bsearch(&tapp, apps->data, apps->len, sizeof(App), app_pid_compare_fn)); + } + ++static App * ++apps_lookup_app (GArray *apps, WnckApplication *application) ++{ ++ App *tapp; ++ guint i; ++ ++ for (i = 0; i < apps->len; i++) { ++ tapp = &g_array_index (apps, App, i); ++ if (tapp->application == application) ++ return (tapp); ++ } ++ ++ return (NULL); ++} ++ + static void + application_opened (WnckScreen *screen __unused, WnckApplication *application, XtmAppManager *manager) + { +-- +cgit v1.2.1 + Property changes on: head/x11/xfce4-taskmanager/files/patch-af078d4 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11/xfce4-taskmanager/files/patch-b896848 =================================================================== --- head/x11/xfce4-taskmanager/files/patch-b896848 (nonexistent) +++ head/x11/xfce4-taskmanager/files/patch-b896848 (revision 479932) @@ -0,0 +1,84 @@ +From b89684865d88bbb8399f70387cae9e8ae17d64d9 Mon Sep 17 00:00:00 2001 +From: rim +Date: Sun, 29 Jul 2018 09:22:48 +0300 +Subject: Better utf-8 normalization (bug 14172) + +--- + src/task-manager.c | 47 ++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 40 insertions(+), 7 deletions(-) + +diff --git a/src/task-manager.c b/src/task-manager.c +index 93f9122..8188de6 100644 +--- src/task-manager.c ++++ src/task-manager.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include "task-manager.h" + #ifdef HAVE_WNCK +@@ -125,12 +126,44 @@ setting_changed (GObject *object, GParamSpec *pspec __unused, XtmTaskManager *ma + static gchar * + pretty_cmdline (gchar *cmdline, gchar *comm) + { +- /* Use the printable range of 0x20-0x7E */ +- const gchar *valid_chars = " !\"#$%&'()*+,-./0123456789:;<=>?@" +- "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`" +- "abcdefghijklmnopqrstuvwxyz{|}~"; +- gchar *text = g_strstrip (g_strcanon (g_strdup (cmdline), valid_chars, ' ')); +- gsize text_size = (gsize)strlen (text); ++ gunichar c; ++ gchar *ch, *text_max, *text = g_strstrip (g_strdup (cmdline)); ++ gsize csize, text_size = (gsize)strlen (text); ++ ++ /* UTF-8 normalize. */ ++ do { ++ for (ch = text, text_max = (text + text_size); ++ text_max > ch; ++ text_max = (text + text_size), ch = g_utf8_next_char(ch)) { ++ c = g_utf8_get_char_validated(ch, -1); /* If use (text_max - ch) - result is worse. */ ++ if ((gunichar)-2 == c) { ++ text_size = (gsize)(ch - text); ++ (*ch) = 0; ++ break; ++ } ++ if ((gunichar)-1 == c) { ++ (*ch) = ' '; ++ continue; ++ } ++ csize = (gsize)g_unichar_to_utf8(c, NULL); ++ ++ if (!g_unichar_isdefined(c) || ++ !g_unichar_isprint(c) || ++ (g_unichar_isspace(c) && (1 != csize || (' ' != (*ch) && ' ' != (*ch)))) || ++ g_unichar_ismark(c) || ++ g_unichar_istitle(c) || ++ g_unichar_iswide(c) || ++ g_unichar_iszerowidth(c) || ++ g_unichar_iscntrl(c)) { ++ if (text_max < (ch + csize)) ++ break; ++ memmove(ch, (ch + csize), (gsize)(text_max - (ch + csize))); ++ text_size -= csize; ++ } ++ } ++ text[text_size] = 0; ++ } while (!g_utf8_validate(text, (gssize)text_size, NULL)); ++ + if (!full_cmdline && text_size > 3) + { + /* Shorten full path to commands and wine applications */ +@@ -139,7 +172,7 @@ pretty_cmdline (gchar *cmdline, gchar *comm) + gchar *p = g_strstr_len (text, (gssize)text_size, comm); + if (p != NULL) + { +- g_strlcpy (text, p, text_size); ++ memmove (text, p, text_size); + } + } + } +-- +cgit v1.2.1 + Property changes on: head/x11/xfce4-taskmanager/files/patch-b896848 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property