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 6787332a3..ec283610e 100644 --- a/xorg-server/hw/xwin/winmultiwindowclass.c +++ b/xorg-server/hw/xwin/winmultiwindowclass.c @@ -134,8 +134,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 @@ -208,8 +209,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 @@ -241,9 +243,11 @@ winMultiWindowGetTransientFor(WindowPtr pWin, Window *pDaddyId) *pDaddyId = 0; while (prop) { - if (prop->propertyName == XA_WM_TRANSIENT_FOR) { + if (prop->propertyName == XA_WM_TRANSIENT_FOR + && prop->format == 32 + && prop->data) { if (pDaddyId) - memcpy(pDaddyId, prop->data, sizeof(Window)); + memcpy (pDaddyId, prop->data, 4*(int)prop->size); /* format/8 = 4 */ return 1; } else |