summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop/lock/main.cc')
-rw-r--r--kdesktop/lock/main.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index 56b4b5fed..e74d9f98f 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -76,6 +76,30 @@ bool MyApp::x11EventFilter( XEvent *ev )
emit activity();
}
}
+ else if (ev->type == MapNotify) {
+ // HACK
+ // Close all tooltips and notification windows
+ XMapEvent map_event = ev->xmap;
+ XWindowAttributes childAttr;
+ Window childTransient;
+ if (XGetWindowAttributes(map_event.display, map_event.window, &childAttr) && XGetTransientForHint(map_event.display, map_event.window, &childTransient)) {
+ if((childAttr.map_state == IsViewable) && (childAttr.override_redirect) && (childTransient)) {
+ XUnmapWindow(map_event.display, map_event.window);
+ }
+ }
+ }
+ else if (ev->type == CreateNotify) {
+ // HACK
+ // Close all tooltips and notification windows
+ XCreateWindowEvent create_event = ev->xcreatewindow;
+ XWindowAttributes childAttr;
+ Window childTransient;
+ if (XGetWindowAttributes(create_event.display, create_event.window, &childAttr) && XGetTransientForHint(create_event.display, create_event.window, &childTransient)) {
+ if ((childAttr.override_redirect) && (childTransient)) {
+ XDestroyWindow(create_event.display, create_event.window);
+ }
+ }
+ }
return KApplication::x11EventFilter( ev );
}