summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/main.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-22 23:31:10 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-22 23:31:10 -0500
commit1f33dc8fd2fc14c2abb74be4e27ef08fdda784d6 (patch)
tree48fc714f87e1d386db0129f73cf54cdd5778a538 /kdesktop/lock/main.cc
parent57f5c0698d49f0a0a7a55c75404f5b9ded910002 (diff)
downloadtdebase-1f33dc8fd2fc14c2abb74be4e27ef08fdda784d6.tar.gz
tdebase-1f33dc8fd2fc14c2abb74be4e27ef08fdda784d6.zip
Attempt to minimize the time in which new notifications are displayed before being hidden
Diffstat (limited to 'kdesktop/lock/main.cc')
-rw-r--r--kdesktop/lock/main.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index a95747e06..7235776fb 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -90,6 +90,7 @@ bool MyApp::x11EventFilter( XEvent *ev )
trinity_desktop_lock_hidden_window_list.append(map_event.window);
}
XLowerWindow(map_event.display, map_event.window);
+ XFlush(map_event.display);
}
}
}
@@ -106,10 +107,27 @@ bool MyApp::x11EventFilter( XEvent *ev )
trinity_desktop_lock_hidden_window_list.append(visibility_event.window);
}
XLowerWindow(visibility_event.display, visibility_event.window);
+ XFlush(visibility_event.display);
}
}
}
}
+ 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)) {
+ if (!trinity_desktop_lock_hidden_window_list.contains(create_event.window)) {
+ trinity_desktop_lock_hidden_window_list.append(create_event.window);
+ }
+ XLowerWindow(create_event.display, create_event.window);
+ XFlush(create_event.display);
+ }
+ }
+ }
else if (ev->type == DestroyNotify) {
XDestroyWindowEvent destroy_event = ev->xdestroywindow;
if (trinity_desktop_lock_hidden_window_list.contains(destroy_event.window)) {