hw/xwin: Win32 Windows properties are of pointer type HANDLE, not an integer type
Win32 Windows properties are of pointer type HANDLE, not an integer type, but we use the Windows property WINDOW_WID_PROP to store the X window XID. Add appropriate casts to show it doesn't matter that an XID is smaller than a pointer on 64-bit build. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
e1a0945e8d
commit
689e7ad9b0
|
@ -519,7 +519,7 @@ winCreateWindowsWindow(WindowPtr pWin)
|
|||
if (winMultiWindowGetTransientFor(pWin, &daddyId)) {
|
||||
if (daddyId) {
|
||||
hFore = GetForegroundWindow();
|
||||
if (hFore && (daddyId != (Window) GetProp(hFore, WIN_WID_PROP)))
|
||||
if (hFore && (daddyId != (Window) (INT_PTR) GetProp(hFore, WIN_WID_PROP)))
|
||||
hFore = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ winCreateWindowsWindow(WindowPtr pWin)
|
|||
/* Cause any .XWinrc menus to be added in main WNDPROC */
|
||||
PostMessage(hWnd, WM_INIT_SYS_MENU, 0, 0);
|
||||
|
||||
SetProp(hWnd, WIN_WID_PROP, (HANDLE) winGetWindowID(pWin));
|
||||
SetProp(hWnd, WIN_WID_PROP, (HANDLE) (INT_PTR) winGetWindowID(pWin));
|
||||
|
||||
/* Flag that this Windows window handles its own activation */
|
||||
SetProp(hWnd, WIN_NEEDMANAGE_PROP, (HANDLE) 0);
|
||||
|
|
|
@ -343,7 +343,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
/* */
|
||||
wmMsg.msg = 0;
|
||||
wmMsg.hwndWindow = hwnd;
|
||||
wmMsg.iWindow = (Window) GetProp(hwnd, WIN_WID_PROP);
|
||||
wmMsg.iWindow = (Window) (INT_PTR) GetProp(hwnd, WIN_WID_PROP);
|
||||
|
||||
wmMsg.iX = pDraw->x;
|
||||
wmMsg.iY = pDraw->y;
|
||||
|
@ -391,8 +391,8 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
/* */
|
||||
SetProp(hwnd,
|
||||
WIN_WID_PROP,
|
||||
(HANDLE) winGetWindowID(((LPCREATESTRUCT) lParam)->
|
||||
lpCreateParams));
|
||||
(HANDLE) (INT_PTR) winGetWindowID(((LPCREATESTRUCT) lParam)->
|
||||
lpCreateParams));
|
||||
|
||||
/*
|
||||
* Make X windows' Z orders sync with Windows windows because
|
||||
|
|
|
@ -181,7 +181,7 @@ ReloadEnumWindowsProc(HWND hwnd, LPARAM lParam)
|
|||
|
||||
wmMsg.msg = WM_WM_ICON_EVENT;
|
||||
wmMsg.hwndWindow = hwnd;
|
||||
wmMsg.iWindow = (Window) GetProp(hwnd, WIN_WID_PROP);
|
||||
wmMsg.iWindow = (Window) (INT_PTR) GetProp(hwnd, WIN_WID_PROP);
|
||||
|
||||
winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user