530.41.03-10: linux 6.3.1.arch2-1
[arch-packages.git] / libwnck3 / trunk / 0005-xutils-check-if-XRes-is-available-before-using-XResQ.patch
blob81d23d089b7ae0d8b407f5cd210077f1ce79d5d3
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= <alberts.muktupavels@gmail.com>
3 Date: Fri, 30 Sep 2022 18:43:07 +0300
4 Subject: [PATCH] xutils: check if XRes is available before using
5 XResQueryClientIds
7 https://gitlab.gnome.org/GNOME/libwnck/-/issues/154
8 ---
9 libwnck/xutils.c | 3 +++
10 1 file changed, 3 insertions(+)
12 diff --git a/libwnck/xutils.c b/libwnck/xutils.c
13 index 08be8aa96f1a..91c2d50ee733 100644
14 --- a/libwnck/xutils.c
15 +++ b/libwnck/xutils.c
16 @@ -1156,6 +1156,9 @@ xres_get_pid (WnckScreen *screen,
17 long client_id_count = 0;
18 XResClientIdValue *client_ids = NULL;
20 + if (!_wnck_handle_has_xres (wnck_screen_get_handle (screen)))
21 + return -1;
23 xscreen = _wnck_screen_get_xscreen (screen);
25 client_spec.client = xwindow;