- Added glib.patch: Fix segfault of tint2 with new version of glib2. See https://gitlab.com/nick87720z/tint2/-/issues/4 OBS-URL: https://build.opensuse.org/request/show/1163561 OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/tint2?expand=0&rev=41
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
--- a/src/main.c 2022-03-24 10:49:12.000000000 +0100
|
|
+++ b/src/main.c 2024-03-25 23:45:33.026055654 +0100
|
|
@@ -534,11 +534,14 @@
|
|
}
|
|
if (e->xany.window == g_tooltip.window || !systray_enabled)
|
|
break;
|
|
- for (GSList *it = systray.list_icons; it; it = it->next)
|
|
+ GSList *copy_list = g_slist_copy(systray.list_icons);
|
|
+ for (GSList *it = copy_list; it; it = it->next)
|
|
{
|
|
- if (((TrayWindow *)it->data)->win == e->xany.window)
|
|
+ void *data = it->data;
|
|
+ if (data != NULL && ((TrayWindow *)data)->win == e->xany.window)
|
|
systray_destroy_event(it->data);
|
|
}
|
|
+ g_slist_free(copy_list);
|
|
break;
|
|
|
|
case ClientMessage: {
|
|
--- a/src/util/uevent.c 2024-03-25 23:37:18.415070100 +0100
|
|
+++ b/src/util/uevent.c 2024-03-25 23:47:40.832150481 +0100
|
|
@@ -146,7 +146,8 @@
|
|
struct uevent ev;
|
|
|
|
if (uevent_new(&ev, buf, len)) {
|
|
- for (GSList *l = notifiers; l; l = l->next)
|
|
+ GSList *copy_list = g_slist_copy(notifiers);
|
|
+ for (GSList *l = copy_list; l; l = l->next)
|
|
{
|
|
struct uevent_notify *nb = l->data;
|
|
|
|
@@ -157,6 +158,7 @@
|
|
|
|
nb->cb(&ev, nb->userdata);
|
|
}
|
|
+ g_slist_free(copy_list);
|
|
uevent_destroy (&ev);
|
|
}
|
|
}
|