[gnome-games] ui: Fix setting fullscreen with shortcuts
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] ui: Fix setting fullscreen with shortcuts
- Date: Sun, 26 Feb 2017 20:20:36 +0000 (UTC)
commit 728ec0eba51f1e053ea781c7853e867413d5eace
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sun Feb 26 21:14:21 2017 +0100
ui: Fix setting fullscreen with shortcuts
Prevent the window to be set fullscreen when using the shortcuts on a
game which doesn't support support fullscreen in Games' window.
src/ui/application-window.vala | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index f62d707..94e579d 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -439,19 +439,20 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
var default_modifiers = Gtk.accelerator_get_default_mod_mask ();
if ((event.keyval == Gdk.Key.f || event.keyval == Gdk.Key.F) &&
- (event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK) {
+ (event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK &&
+ display_header_bar.can_fullscreen) {
is_fullscreen = !is_fullscreen;
return true;
}
- if (event.keyval == Gdk.Key.F11) {
+ if (event.keyval == Gdk.Key.F11 && display_header_bar.can_fullscreen) {
is_fullscreen = !is_fullscreen;
return true;
}
- if (event.keyval == Gdk.Key.Escape) {
+ if (event.keyval == Gdk.Key.Escape && display_header_bar.can_fullscreen) {
is_fullscreen = false;
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]