diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-07-22 17:38:55 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-08-03 22:47:27 +0100 |
commit | 2677d89823b851fea31036f51589985bb86864b7 (patch) | |
tree | e214785e75ac494036a11d07262191814ae7722e /hw/xwin/winmultiwindowwm.c | |
parent | a07541f1ffc28c57a762beefb96c7bf0ac40b0a4 (diff) |
hw/xwin: Also update icon when _NET_WM_ICON property changes
_NET_WM_ICON property is also considered to decide on the window icon, so also
send a WM_WM_ICON_EVENT message to the WM if the PropertyNotify event is for
_NET_WM_ICON property
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw/xwin/winmultiwindowwm.c')
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index c30efa90e..b7909cc7c 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -821,6 +821,7 @@ winMultiWindowXMsgProc(void *pArg) Atom atmWmName; Atom atmWmHints; Atom atmWmChange; + Atom atmNetWmIcon; int iReturn; XIconSize *xis; @@ -946,6 +947,7 @@ winMultiWindowXMsgProc(void *pArg) atmWmName = XInternAtom(pProcArg->pDisplay, "WM_NAME", False); atmWmHints = XInternAtom(pProcArg->pDisplay, "WM_HINTS", False); atmWmChange = XInternAtom(pProcArg->pDisplay, "WM_CHANGE_STATE", False); + atmNetWmIcon = XInternAtom(pProcArg->pDisplay, "_NET_WM_ICON", False); /* iiimxcf had a bug until 2009-04-27, assuming that the @@ -1073,25 +1075,25 @@ winMultiWindowXMsgProc(void *pArg) True, StructureNotifyMask, &event_send); } } - else if (event.type == PropertyNotify - && event.xproperty.atom == atmWmName) { - memset(&msg, 0, sizeof(msg)); - - msg.msg = WM_WM_NAME_EVENT; - msg.iWindow = event.xproperty.window; + else if (event.type == PropertyNotify) { + if (event.xproperty.atom == atmWmName) { + memset(&msg, 0, sizeof(msg)); - /* Other fields ignored */ - winSendMessageToWM(pProcArg->pWMInfo, &msg); - } - else if (event.type == PropertyNotify - && event.xproperty.atom == atmWmHints) { - memset(&msg, 0, sizeof(msg)); + msg.msg = WM_WM_NAME_EVENT; + msg.iWindow = event.xproperty.window; - msg.msg = WM_WM_ICON_EVENT; - msg.iWindow = event.xproperty.window; - - /* Other fields ignored */ - winSendMessageToWM(pProcArg->pWMInfo, &msg); + /* Other fields ignored */ + winSendMessageToWM(pProcArg->pWMInfo, &msg); + } + else if ((event.xproperty.atom == atmWmHints) || + (event.xproperty.atom == atmNetWmIcon)) { + memset(&msg, 0, sizeof(msg)); + msg.msg = WM_WM_ICON_EVENT; + msg.iWindow = event.xproperty.window; + + /* Other fields ignored */ + winSendMessageToWM(pProcArg->pWMInfo, &msg); + } } else if (event.type == ClientMessage && event.xclient.message_type == atmWmChange |