[gnome-games/wip/exalm/fullscreen: 4/4] display-header-bar: Disallow focusing buttons in fullscreen
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/fullscreen: 4/4] display-header-bar: Disallow focusing buttons in fullscreen
- Date: Sat, 20 Oct 2018 03:16:46 +0000 (UTC)
commit 5b7ecd898500239219a16d54174c9be8e210c230
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]