summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathias <mathias>2005-01-10 09:04:46 (GMT)
committermathias <mathias>2005-01-10 09:04:46 (GMT)
commit8054e16fab822e6171a58d28bd087e5508839603 (patch)
treed07604dc1b848eb77cbfc713463fcf43046ff7a9 /src
parent51f30a5a63c1ce233220df0f39bfccba9975698d (diff)
downloadfluxbox_lack-8054e16fab822e6171a58d28bd087e5508839603.zip
fluxbox_lack-8054e16fab822e6171a58d28bd087e5508839603.tar.bz2
fix for #1087220 (Wrong handling of XWithdrawWindow)
an XWithdrawWindow unmaps a window and sends a synthetic UnmapEvent after that. when the second UnmapEvent arrives we have to set either the WM_STATE to WithdrawnState or delete it. i decided for deletion so its absolutly clear its not any longer under our control
Diffstat (limited to 'src')
-rw-r--r--src/fluxbox.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 19a0daa..3d75b31 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -900,13 +900,13 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
900 900
901void Fluxbox::handleUnmapNotify(XUnmapEvent &ue) { 901void Fluxbox::handleUnmapNotify(XUnmapEvent &ue) {
902 902
903
904 WinClient *winclient = 0;
905
906 BScreen *screen = searchScreen(ue.event); 903 BScreen *screen = searchScreen(ue.event);
907 904
908 if ( ue.event != ue.window && (screen != 0 || !ue.send_event)) 905 if (ue.event != ue.window && (!screen || !ue.send_event)) {
909 return; 906 return;
907 }
908
909 WinClient *winclient = 0;
910 910
911 if ((winclient = searchWindow(ue.window)) != 0) { 911 if ((winclient = searchWindow(ue.window)) != 0) {
912 912
@@ -929,6 +929,13 @@ void Fluxbox::handleUnmapNotify(XUnmapEvent &ue) {
929 win = 0; 929 win = 0;
930 } 930 }
931 } 931 }
932
933 // according to http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.4
934 // a XWithdrawWindow is
935 // 1) unmapping the window (which leads to the upper branch
936 // 2) sends an synthetic unampevent (which is handled below)
937 } else if (screen && ue.send_event) {
938 XDeleteProperty(display(), ue.window, FbAtoms::instance()->getWMStateAtom());
932 } 939 }
933 940
934} 941}