hw/xwin: Correct size of _WINDOWSWM_NATIVE_HWND property on x86_64

Use the correct size of a HWND on x86_64 in XChangeProperty() and
XGetWindowProperty() calls for the _WINDOWSWM_NATIVE_HWND property.

Signed-off-by: Marc Haesen <marha@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Marc Haesen 2013-08-02 18:19:22 +01:00 committed by Jon TURNEY
parent 390cfec10e
commit 41d03c9ccc

View File

@ -488,7 +488,7 @@ getHwnd(WMInfoPtr pWMInfo, Window iWindow)
iWindow, iWindow,
pWMInfo->atmPrivMap, pWMInfo->atmPrivMap,
0, 0,
1, sizeof(HWND)/4,
False, False,
XA_INTEGER, XA_INTEGER,
&atmType, &atmType,
@ -747,10 +747,10 @@ winMultiWindowWMProc(void *pArg)
ErrorF("\tWM_WM_MAP\n"); ErrorF("\tWM_WM_MAP\n");
#endif #endif
/* Put a note as to the HWND associated with this Window */ /* Put a note as to the HWND associated with this Window */
XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER, //pWMInfo->atmPrivMap, XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER,
32, 32,
PropModeReplace, PropModeReplace,
(unsigned char *) &(pNode->msg.hwndWindow), 1); (unsigned char *) &(pNode->msg.hwndWindow), sizeof(HWND)/4);
UpdateName(pWMInfo, pNode->msg.iWindow); UpdateName(pWMInfo, pNode->msg.iWindow);
UpdateIcon(pWMInfo, pNode->msg.iWindow); UpdateIcon(pWMInfo, pNode->msg.iWindow);
break; break;
@ -759,10 +759,10 @@ winMultiWindowWMProc(void *pArg)
#if CYGMULTIWINDOW_DEBUG #if CYGMULTIWINDOW_DEBUG
ErrorF("\tWM_WM_MAP2\n"); ErrorF("\tWM_WM_MAP2\n");
#endif #endif
XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER, //pWMInfo->atmPrivMap, XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER,
32, 32,
PropModeReplace, PropModeReplace,
(unsigned char *) &(pNode->msg.hwndWindow), 1); (unsigned char *) &(pNode->msg.hwndWindow), sizeof(HWND)/4);
break; break;
case WM_WM_MAP3: case WM_WM_MAP3:
@ -770,10 +770,10 @@ winMultiWindowWMProc(void *pArg)
ErrorF("\tWM_WM_MAP3\n"); ErrorF("\tWM_WM_MAP3\n");
#endif #endif
/* Put a note as to the HWND associated with this Window */ /* Put a note as to the HWND associated with this Window */
XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER, //pWMInfo->atmPrivMap, XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER,
32, 32,
PropModeReplace, PropModeReplace,
(unsigned char *) &(pNode->msg.hwndWindow), 1); (unsigned char *) &(pNode->msg.hwndWindow), sizeof(HWND)/4);
UpdateName(pWMInfo, pNode->msg.iWindow); UpdateName(pWMInfo, pNode->msg.iWindow);
UpdateIcon(pWMInfo, pNode->msg.iWindow); UpdateIcon(pWMInfo, pNode->msg.iWindow);
UpdateStyle(pWMInfo, pNode->msg.iWindow); UpdateStyle(pWMInfo, pNode->msg.iWindow);