[gnome-games/wip/exalm/ui4: 7/7] fullscreen-box: Hide cursor in windowed mode too



commit 3ce94efe56e812141998b44e1358f73f7707bc28
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Jun 9 15:45:46 2019 +0500

    fullscreen-box: Hide cursor in windowed mode too
    
    Text editors have been doing this since forever, let's do it too. Still
    hide it after a delay and not after pressing a key, because it would get
    in the way if a game actually uses cursor.

 src/ui/fullscreen-box.vala | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/src/ui/fullscreen-box.vala b/src/ui/fullscreen-box.vala
index daa01013..17553d82 100644
--- a/src/ui/fullscreen-box.vala
+++ b/src/ui/fullscreen-box.vala
@@ -112,9 +112,6 @@ private class Games.FullscreenBox : Gtk.EventBox, Gtk.Buildable {
                        cursor_timeout_id = -1;
                }
 
-               if (!is_fullscreen)
-                       return;
-
                cursor_timeout_id = Timeout.add (INACTIVITY_TIME_MILLISECONDS, on_inactivity);
                show_cursor (true);
        }
@@ -122,9 +119,6 @@ private class Games.FullscreenBox : Gtk.EventBox, Gtk.Buildable {
        private bool on_inactivity () {
                cursor_timeout_id = -1;
 
-               if (!is_fullscreen)
-                       return false;
-
                show_cursor (false);
 
                return false;
@@ -142,7 +136,7 @@ private class Games.FullscreenBox : Gtk.EventBox, Gtk.Buildable {
                }
 
                header_bar_revealer.reveal_child = false;
-               show_cursor (true);
+               on_cursor_moved ();
        }
 
        private void show_cursor (bool show) {


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