[gnome-games] ui: Show cursor when leaving fullscreen



commit 8305c01b9826a14f6694815efde6483a1679fed6
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sat Aug 27 21:55:00 2016 +0200

    ui: Show cursor when leaving fullscreen
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770492

 src/ui/display-box.vala |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/ui/display-box.vala b/src/ui/display-box.vala
index 9cb4026..d6ea73a 100644
--- a/src/ui/display-box.vala
+++ b/src/ui/display-box.vala
@@ -61,7 +61,10 @@ private class Games.DisplayBox : Gtk.EventBox {
 
        [GtkCallback]
        private void on_fullscreen_changed () {
-               on_activity ();
+               if (is_fullscreen)
+                       on_activity ();
+               else
+                       on_restore ();
        }
 
        [GtkCallback]
@@ -103,6 +106,16 @@ private class Games.DisplayBox : Gtk.EventBox {
                return false;
        }
 
+       private void on_restore () {
+               if (timeout_id != -1) {
+                       Source.remove ((uint) timeout_id);
+                       timeout_id = -1;
+               }
+
+               fullscreen_header_bar_revealer.reveal_child = false;
+               show_cursor (true);
+       }
+
        private void show_cursor (bool show) {
                var window = get_window ();
                if (window == null)


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