[Xfce4-commits] [xfce/xfwm4] 01/01: hints: Fix WM protocols detection
noreply at xfce.org
noreply at xfce.org
Sat May 11 18:23:00 CEST 2019
This is an automated email from the git hooks/post-receive script.
o l i v i e r p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfwm4.
commit 4bd247bfd2c12cf994ad910f8f04f4790472088b
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sat May 11 18:21:18 2019 +0200
hints: Fix WM protocols detection
Oddly, `XGetWMProtocols()` return a non-zero value on success, checking
against `Success` would lead to the wrong conclusion.
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
Fixes: 0bf68c537 - "Protect against XErrors"
---
src/hints.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/hints.c b/src/hints.c
index 33ee033..7ab9354 100644
--- a/src/hints.c
+++ b/src/hints.c
@@ -177,11 +177,13 @@ getWMProtocols (DisplayInfo *display_info, Window w)
flags = 0;
protocols = NULL;
+ data = NULL;
+
myDisplayErrorTrapPush (display_info);
status = XGetWMProtocols (display_info->dpy, w, &protocols, &n);
result = myDisplayErrorTrapPop (display_info);
- if ((status == Success) && (result == Success) && (protocols != NULL))
+ if (status && (result == Success) && (protocols != NULL))
{
for (i = 0, ap = protocols; i < n; i++, ap++)
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list