[arch-commits] Commit in lxpanel/trunk (PKGBUILD fix-crash.patch)
Balló György
bgyorgy at archlinux.org
Sat Mar 24 11:25:46 UTC 2018
Date: Saturday, March 24, 2018 @ 11:25:45
Author: bgyorgy
Revision: 311784
upgpkg: lxpanel 0.9.3-2
Fix crash (FS#57126)
Added:
lxpanel/trunk/fix-crash.patch
Modified:
lxpanel/trunk/PKGBUILD
-----------------+
PKGBUILD | 14 ++++++++--
fix-crash.patch | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 82 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-03-24 11:10:41 UTC (rev 311783)
+++ PKGBUILD 2018-03-24 11:25:45 UTC (rev 311784)
@@ -6,7 +6,7 @@
pkgname=lxpanel
pkgver=0.9.3
-pkgrel=1
+pkgrel=2
pkgdesc='Lightweight X11 desktop panel for LXDE'
arch=('x86_64')
license=('GPL2')
@@ -15,9 +15,17 @@
depends=('alsa-lib' 'menu-cache' 'lxmenu-data' 'libwnck' 'libfm-gtk2' 'libkeybinder2')
makedepends=('intltool' 'docbook-xml' 'docbook-xsl' 'wireless_tools')
optdepends=('wireless_tools: netstat plugin')
-source=(https://downloads.sourceforge.net/lxde/$pkgname-$pkgver.tar.xz)
-sha256sums=('342cfa205f255acf69c76ba0ca6c77c890f3955a879b755931c80ffae4d98fb1')
+source=(https://downloads.sourceforge.net/lxde/$pkgname-$pkgver.tar.xz
+ fix-crash.patch)
+sha256sums=('342cfa205f255acf69c76ba0ca6c77c890f3955a879b755931c80ffae4d98fb1'
+ 'a9a8363a01e7a9740d0ab6b844b1cb8b881c42da9f28fa9eb4eab0b5a7f52cf4')
+prepare() {
+ cd $pkgname-$pkgver
+ # Fix crash
+ patch -Np1 -i ../fix-crash.patch
+}
+
build() {
cd $pkgname-$pkgver
./configure \
Added: fix-crash.patch
===================================================================
--- fix-crash.patch (rev 0)
+++ fix-crash.patch 2018-03-24 11:25:45 UTC (rev 311784)
@@ -0,0 +1,71 @@
+From 5efc0f05fc06cdb52c54338d0139d7316c3c1133 Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka at fedoraproject.org>
+Date: Sun, 4 Mar 2018 23:15:51 +0900
+Subject: [PATCH] [SF#900] taskbutton: detach menu from widget before widget is
+ destroyed
+
+Although GTK+ 2 version doxygen lacks such information,
+https://developer.gnome.org/gtk3/stable/GtkMenu.html#gtk-menu-attach-to-widget
+says that the attached menu is to be destroyed when the widget is destroyed.
+
+So to "reuse" created menu, menu must be detached before the widget is to
+be destroyed,
+---
+ plugins/task-button.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/plugins/task-button.c b/plugins/task-button.c
+index 3e99068..9e8c398 100644
+--- a/plugins/task-button.c
++++ b/plugins/task-button.c
+@@ -1538,7 +1538,17 @@ void task_button_update_windows_list(TaskButton *button, Window *list, gint n)
+ l = next; /* go next details */
+ }
+ if (button->details == NULL) /* all windows were deleted */
++ {
++ GList *menu_list = gtk_menu_get_for_attach_widget(GTK_WIDGET(button));
++ menu_list = g_list_copy(menu_list);
++ for (l = menu_list; l; l = l->next)
++ {
++ GtkMenu *menu = GTK_MENU(l->data);
++ gtk_menu_detach(menu);
++ }
++ g_list_free(menu_list);
+ gtk_widget_destroy(GTK_WIDGET(button));
++ }
+ else if (has_removed && task_update_visibility(button))
+ task_redraw_label(button);
+ // FIXME: test if need to update menu
+--
+2.1.4
+
+From 7aa84571eef5247c0335df57d6ac616cd03d46ee Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka at fedoraproject.org>
+Date: Wed, 14 Feb 2018 00:11:53 +0900
+Subject: [PATCH] [SF#905] plugins/monitors: reset the color if empty
+
+User may remove color value, or when doing copy/paste color value from somewhere,
+it seems that color value can once disappear.
+In such case, reset to the default to prevent segv
+---
+ plugins/monitors/monitors.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/plugins/monitors/monitors.c b/plugins/monitors/monitors.c
+index 19b8472..75f00c1 100644
+--- a/plugins/monitors/monitors.c
++++ b/plugins/monitors/monitors.c
+@@ -748,6 +748,10 @@ monitors_apply_config (gpointer user_data)
+ start:
+ for (i = 0; i < N_MONITORS; i++)
+ {
++ /* User may remove color value. In such case, reset to the default */
++ if (!colors[i])
++ colors[i] = g_strndup(default_colors[i], COLOR_SIZE-1);
++
+ if (mp->displayed_monitors[i])
+ current_n_monitors++;
+
+--
+2.1.4
+
More information about the arch-commits
mailing list