[gnome-games/wip/exalm/fullscreen: 2/2] display-header-bar: Disallow focusing buttons in fullscreen



commit a39ce77e5bfcc5d16f7830c384059ff92c1e41c8
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sat Oct 20 00:53:18 2018 +0500

    display-header-bar: Disallow focusing buttons in fullscreen
    
    Prevents header bar from grabbing arrow keys while playing game.
    
    Fixes #132

 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 e92d2634..709c418f 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]