[gnome-games/gnome-3-30] display-header-bar: Don't grab focus in fullscreen



commit 7d201748b5e66784b61cfec323983cc1045c93cf
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Fri Oct 19 19:53:18 2018 +0000

    display-header-bar: Don't grab focus in fullscreen
    
    Prevents header bar buttons from grabbing arrow keys while playing a game.
    
    Fixes #132
    
    
    (cherry picked from commit 723586b0f16d3ad40ad5779b325b98a31a060b7c)

 src/ui/display-header-bar.vala | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/ui/display-header-bar.vala b/src/ui/display-header-bar.vala
index 5fa67496..07a11d02 100644
--- a/src/ui/display-header-bar.vala
+++ b/src/ui/display-header-bar.vala
@@ -23,6 +23,9 @@ private class Games.DisplayHeaderBar : Gtk.HeaderBar {
 
        private MediaSelector media_selector;
 
+       [GtkChild (name = "back")]
+       private Gtk.Button _back;
+
        [GtkChild]
        private Gtk.Button fullscreen;
 
@@ -43,6 +46,9 @@ private class Games.DisplayHeaderBar : Gtk.HeaderBar {
        private void on_fullscreen_changed () {
                fullscreen.visible = can_fullscreen && !is_fullscreen;
                restore.visible = can_fullscreen && is_fullscreen;
+
+               _back.can_focus = !is_fullscreen;
+               restore.can_focus = !is_fullscreen;
        }
 
        [GtkCallback]


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