diff options
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowclass.c')
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowclass.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowclass.c b/xorg-server/hw/xwin/winmultiwindowclass.c index 1af104df9..cc7628d5c 100644 --- a/xorg-server/hw/xwin/winmultiwindowclass.c +++ b/xorg-server/hw/xwin/winmultiwindowclass.c @@ -127,8 +127,9 @@ winMultiWindowGetWMHints(WindowPtr pWin, WinXWMHints * hints) memset(hints, 0, sizeof(WinXWMHints)); while (prop) { - if (prop->propertyName == XA_WM_HINTS && prop->data) { - memcpy(hints, prop->data, sizeof(WinXWMHints)); + if (prop->propertyName == XA_WM_HINTS && prop->data + && prop->format == 32) { + memcpy (hints, prop->data, 4*(int)prop->size); /* format/8 = 4 */ return 1; } else @@ -201,8 +202,9 @@ winMultiWindowGetWMNormalHints(WindowPtr pWin, WinXSizeHints * hints) memset(hints, 0, sizeof(WinXSizeHints)); while (prop) { - if (prop->propertyName == XA_WM_NORMAL_HINTS && prop->data) { - memcpy(hints, prop->data, sizeof(WinXSizeHints)); + if (prop->propertyName == XA_WM_NORMAL_HINTS && prop->data + && prop->format == 32) { + memcpy (hints, prop->data, 4*(int)prop->size); /* format/8 = 4 */ return 1; } else @@ -234,9 +236,11 @@ winMultiWindowGetTransientFor(WindowPtr pWin, WindowPtr *ppDaddy) *ppDaddy = NULL; while (prop) { - if (prop->propertyName == XA_WM_TRANSIENT_FOR) { + if (prop->propertyName == XA_WM_TRANSIENT_FOR + && prop->format == 32 + && prop->data) { if (ppDaddy) - memcpy(ppDaddy, prop->data, sizeof(WindowPtr)); + memcpy (ppDaddy, prop->data, 4*(int)prop->size); /* format/8 = 4 */ return 1; } else |