Commit d2a39823 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko

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.
parent c5d81f97
Pipeline #101052 passed with stages
in 18 minutes and 6 seconds
......@@ -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) {
......
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