[gnome-games/wip/exalm/ui4: 22/26] fullscreen-box: Only reveal header bar when cursor is nearby
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/ui4: 22/26] fullscreen-box: Only reveal header bar when cursor is nearby
- Date: Fri, 2 Aug 2019 20:15:32 +0000 (UTC)
commit 9be7b863d9181e3f61c0c5c8481bdb9265d75399
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Thu Jun 6 01:08:53 2019 +0500
fullscreen-box: Only reveal header bar when cursor is nearby
Match libdazzle behavior by only revealing the header bar when cursor is
closer to the top of the screen than 5px.
src/ui/fullscreen-box.vala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/ui/fullscreen-box.vala b/src/ui/fullscreen-box.vala
index d2d04010..16e1d3b4 100644
--- a/src/ui/fullscreen-box.vala
+++ b/src/ui/fullscreen-box.vala
@@ -3,6 +3,7 @@
[GtkTemplate (ui = "/org/gnome/Games/ui/fullscreen-box.ui")]
private class Games.FullscreenBox : Gtk.EventBox, Gtk.Buildable {
private const uint INACTIVITY_TIME_MILLISECONDS = 2000;
+ private const int SHOW_HEADERBAR_DISTANCE = 5;
public bool is_fullscreen { get; set; }
@@ -68,7 +69,8 @@ private class Games.FullscreenBox : Gtk.EventBox, Gtk.Buildable {
[GtkCallback]
private bool on_motion_event (Gdk.EventMotion event) {
- on_activity ();
+ if (event.y_root <= SHOW_HEADERBAR_DISTANCE)
+ on_activity ();
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]