[gtk/fix-focus-issues: 2/3] focus controller: Update for active window




commit 1cc100415f9675c94cb6435bb5d8376b8c9b6a85
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 7 11:32:22 2022 -0700

    focus controller: Update for active window
    
    When the window gains or looses active status,
    update the focus controllers status.

 gtk/gtkeventcontrollerfocus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkeventcontrollerfocus.c b/gtk/gtkeventcontrollerfocus.c
index 85026a7acf..cc4c2b8f0b 100644
--- a/gtk/gtkeventcontrollerfocus.c
+++ b/gtk/gtkeventcontrollerfocus.c
@@ -149,7 +149,8 @@ gtk_event_controller_focus_handle_crossing (GtkEventController    *controller,
                                             double                 x,
                                             double                 y)
 {
-  if (crossing->type == GTK_CROSSING_FOCUS)
+  if (crossing->type == GTK_CROSSING_FOCUS ||
+      crossing->type == GTK_CROSSING_ACTIVE)
     update_focus (controller, crossing);
 }
 


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