summaryrefslogtreecommitdiff
path: root/community/lightdm-gtk2-greeter/tooltip-focus.patch
blob: 9444222a9ad123d6dacca729c34e2836d959dd1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/src/lightdm-gtk-greeter.c	2014-03-26 10:28:44 +0000
+++ b/src/lightdm-gtk-greeter.c	2014-04-23 11:04:01 +0000
@@ -2203,6 +2203,7 @@
         Window keyboard_xid = 0;
         GdkDisplay* display = gdk_x11_lookup_xdisplay (xevent->xmap.display);
         GdkWindow* win = gdk_x11_window_foreign_new_for_display (display, xwin);
+        GdkWindowTypeHint win_type = gdk_window_get_type_hint (win);
 
         /* Check to see if this window is our onboard window, since we don't want to focus it. */
         if (keyboard_win)
@@ -2211,8 +2212,10 @@
 #else
                 keyboard_xid = gdk_x11_drawable_get_xid (keyboard_win);
 #endif
-            
-        if (xwin != keyboard_xid && gdk_window_get_type_hint (win) != GDK_WINDOW_TYPE_HINT_NOTIFICATION)
+
+        if (xwin != keyboard_xid
+            && win_type != GDK_WINDOW_TYPE_HINT_TOOLTIP
+            && win_type != GDK_WINDOW_TYPE_HINT_NOTIFICATION)
         {
             gdk_window_focus (win, GDK_CURRENT_TIME);
             /* Make sure to keep keyboard above */