[gnome-games/wip/exalm/ui4: 26/26] fullscreen-box: Hide cursor in windowed mode too
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/ui4: 26/26] fullscreen-box: Hide cursor in windowed mode too
- Date: Fri, 2 Aug 2019 20:15:52 +0000 (UTC)
commit d2a39823ff1609f8a0f28065c993f57faaa94b81
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]