diff options
3 files changed, 26 insertions, 6 deletions
diff --git a/desktop/xfce4-windowck-plugin/aab7417cb3ca9a7c7a8798b3b3736c71bb19d419.patch b/desktop/xfce4-windowck-plugin/aab7417cb3ca9a7c7a8798b3b3736c71bb19d419.patch new file mode 100644 index 000000000000..dd9d521c4b6e --- /dev/null +++ b/desktop/xfce4-windowck-plugin/aab7417cb3ca9a7c7a8798b3b3736c71bb19d419.patch @@ -0,0 +1,22 @@ +From aab7417cb3ca9a7c7a8798b3b3736c71bb19d419 Mon Sep 17 00:00:00 2001 +From: foobarbyte <61650320+foobarbyte@users.noreply.github.com> +Date: Fri, 26 Jun 2020 07:07:55 +0000 +Subject: [PATCH] Fix crash on closing last active window. + +When on_name_changed is called, controlwindow may refer to a window that has been closed. If so, this leads to is_window_on_active_workspace_and_no_other_maximized_windows_above causing a segmentation fault when top_window turns out to be NULL. Since we would like to clear the displayed window title in this case, we should first check whether controlwindow refers to a closed window. It makes sense to do this where we already check if it is NULL or if it refers to the Desktop. We can check this by determining whether the window has a valid PID using wnck_window_get_pid. +--- + panel-plugin/title/windowck-title.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/panel-plugin/title/windowck-title.c b/panel-plugin/title/windowck-title.c +index e73c2bd..b465a7b 100644 +--- a/panel-plugin/title/windowck-title.c ++++ b/panel-plugin/title/windowck-title.c +@@ -123,6 +123,7 @@ static void on_name_changed (WnckWindow *controlwindow, WindowckPlugin *wckp) + const gchar *title_text; + + if (controlwindow ++ && wnck_window_get_pid(controlwindow) // if active window has been closed, pid is 0 + && ((wnck_window_get_window_type (controlwindow) != WNCK_WINDOW_DESKTOP) + || wckp->prefs->show_on_desktop)) + { diff --git a/desktop/xfce4-windowck-plugin/doinst.sh b/desktop/xfce4-windowck-plugin/doinst.sh index d8b0d0d87bbb..65c7e2eeb9aa 100644 --- a/desktop/xfce4-windowck-plugin/doinst.sh +++ b/desktop/xfce4-windowck-plugin/doinst.sh @@ -1,4 +1,3 @@ - if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi @@ -8,4 +7,3 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 fi fi - diff --git a/desktop/xfce4-windowck-plugin/xfce4-windowck-plugin.SlackBuild b/desktop/xfce4-windowck-plugin/xfce4-windowck-plugin.SlackBuild index cea925d161e2..c6dfe93c0eb2 100644 --- a/desktop/xfce4-windowck-plugin/xfce4-windowck-plugin.SlackBuild +++ b/desktop/xfce4-windowck-plugin/xfce4-windowck-plugin.SlackBuild @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=xfce4-windowck-plugin VERSION=${VERSION:-0.4.10} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -39,9 +39,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -80,6 +77,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# add missing cedl38 upstream patch for last window close +patch -p1 < ${CWD}/aab7417cb3ca9a7c7a8798b3b3736c71bb19d419.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./autogen.sh \ |