diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-03-31 18:45:28 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-03-31 19:23:05 +0100 |
commit | c29d265d52fa9722c8f478d54fe3841a1c1fb0f6 (patch) | |
tree | 04f15bfcc4a5aa0461e75b671143293e81e6f39a | |
parent | 5d7804b16a3647cf2ba8014bed46aa061e9a1c88 (diff) |
Make sure that WM_WM_ICON_EVENT and WM_WM_HINTS_EVENT do nothing for override-redirect windows
XXX: This whole mess could be rationalized quite a lot: Sending WM_WM_MAP2 or WM_WM_MAP3 depending
on override-redirect could be consolidated since we check that anyhow, but pull the flag up
out of UpdateIcon() and UpdateName().
Alternatively, it would be nice if we checked for override-redirect before sending WM_WM_ICON_EVENT
or WM_WM_HINTS_EVENT...
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index a8d101703..a18c21570 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -633,10 +633,14 @@ UpdateIcon (WMInfoPtr pWMInfo, Window iWindow) { HWND hWnd; HICON hIconNew = NULL; + XWindowAttributes attr; hWnd = getHwnd (pWMInfo, iWindow); if (!hWnd) return; + /* If window isn't override-redirect */ + XGetWindowAttributes (pWMInfo->pDisplay, iWindow, &attr); + if (!attr.override_redirect) { XClassHint class_hint = {0,0}; char *window_name = 0; @@ -897,8 +901,12 @@ winMultiWindowWMProc (void *pArg) HWND zstyle = HWND_NOTOPMOST; UINT flags; Bool onTaskbar; + XWindowAttributes attr; - /* XXX: probably should check for override-redirect and not do anything */ + /* Don't do anything if this is an override-redirect window */ + XGetWindowAttributes (pWMInfo->pDisplay, pNode->msg.iWindow, &attr); + if (attr.override_redirect) + break; pNode->msg.hwndWindow = getHwnd(pWMInfo, pNode->msg.iWindow); |