summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/main.cc
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-09-21 18:27:59 -0500
committerTimothy Pearson <[email protected]>2012-09-21 18:27:59 -0500
commit553923b25dc41e2c17ba9038eb225cd3bb9b1770 (patch)
tree25bc7302752077da3435eb52b5464c994641f228 /kdesktop/lock/main.cc
parent249c80deda7c2e6343858573ca840da5f573d47b (diff)
downloadtdebase-553923b25dc41e2c17ba9038eb225cd3bb9b1770.tar.gz
tdebase-553923b25dc41e2c17ba9038eb225cd3bb9b1770.zip
Forcibly prevent transient override redirect windows from showing up over the lock screen
This closes Bug 1079
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 );
}