Fix XGetWindowProperty() usage on LP64 archs.
Based on a submission by Alessandro De Laurenzis.
This commit is contained in:
parent
3dbd7aef75
commit
d18f2ad728
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.21 2019/07/12 20:51:24 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.22 2020/05/15 16:51:26 naddy Exp $
|
||||
|
||||
COMMENT= interact with an EWMH/NetWM window manager
|
||||
DISTNAME= wmctrl-1.07
|
||||
REVISION= 8
|
||||
REVISION= 9
|
||||
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= ${HOMEPAGE}
|
||||
|
19
x11/wmctrl/patches/patch-main_c
Normal file
19
x11/wmctrl/patches/patch-main_c
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-main_c,v 1.1 2020/05/15 16:51:26 naddy Exp $
|
||||
|
||||
Index: main.c
|
||||
--- main.c.orig
|
||||
+++ main.c
|
||||
@@ -1439,8 +1439,12 @@ static gchar *get_property (Display *disp, Window win,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+ /* Data returned in 32-bit format is stored as long */
|
||||
+ if (ret_format == 32)
|
||||
+ tmp_size = sizeof(long) * ret_nitems;
|
||||
+ else
|
||||
+ tmp_size = (ret_format / 8) * ret_nitems;
|
||||
/* null terminate the result to make string handling easier */
|
||||
- tmp_size = (ret_format / 8) * ret_nitems;
|
||||
ret = g_malloc(tmp_size + 1);
|
||||
memcpy(ret, ret_prop, tmp_size);
|
||||
ret[tmp_size] = '\0';
|
Loading…
x
Reference in New Issue
Block a user