[gnome-games] display-view: Grab focus for CoreView immediately after focusing window



commit 2175b31f62f23387f04560a36487b3de78d5809a
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Mar 7 17:37:09 2020 +0500

    display-view: Grab focus for CoreView immediately after focusing window

 src/ui/display-view.vala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/ui/display-view.vala b/src/ui/display-view.vala
index 5c08a753..b6714b59 100644
--- a/src/ui/display-view.vala
+++ b/src/ui/display-view.vala
@@ -548,8 +548,10 @@ private class Games.DisplayView : Object, UiView {
                        return;
 
                if (window.is_active) {
-                       if (!is_showing_snapshots)
+                       if (!is_showing_snapshots) {
                                runner.resume ();
+                               runner.get_display ().grab_focus ();
+                       }
                }
                else if (with_delay)
                        focus_out_timeout_id = Timeout.add (FOCUS_OUT_DELAY_MILLISECONDS, 
on_focus_out_delay_elapsed);


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