[gtk/focus-active: 3/3] eventcontrollerkey: Update im focus when active window changes




commit 643d873f47f4f45d660759e9814254fce680d1f6
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jul 30 13:23:45 2020 -0400

    eventcontrollerkey: Update im focus when active window changes
    
    Use the new GTK_CROSSING_ACTIVE crossing events to update
    the im context focus when the window becomes active or
    inactive. IBus requires this, since it has only a single,
    global focus location.
    
    Fixes: #2390

 gtk/gtkeventcontrollerkey.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkeventcontrollerkey.c b/gtk/gtkeventcontrollerkey.c
index e813654be8..4d8774b425 100644
--- a/gtk/gtkeventcontrollerkey.c
+++ b/gtk/gtkeventcontrollerkey.c
@@ -154,7 +154,8 @@ gtk_event_controller_key_handle_crossing (GtkEventController    *controller,
   gboolean start_crossing, end_crossing;
   gboolean is_focus;
 
-  if (crossing->type != GTK_CROSSING_FOCUS)
+  if (crossing->type != GTK_CROSSING_FOCUS &&
+      crossing->type != GTK_CROSSING_ACTIVE)
     return;
 
   start_crossing = crossing->direction == GTK_CROSSING_OUT &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]