Commit 7d201748 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko

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 723586b0)
parent 83014ad6
Pipeline #36670 failed with stages
in 16 minutes and 56 seconds
......@@ -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]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment