summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Mikhaylenko <alexm@gnome.org>2021-03-24 17:14:18 +0500
committerAlexander Mikhaylenko <alexm@gnome.org>2021-03-24 17:14:18 +0500
commitec68b7f266ab9dd8454159b7c45f885a866da89f (patch)
tree83c3a9b8fb3dda40ddd27a190ba9d76c886742fc
parent0549ac463e3f38fed0c111730242ea9196b745cf (diff)
downloadepiphany-wip/exalm/fullscreen2.tar.gz
fullscreen-box: Minimize delayswip/exalm/fullscreen2
Only keep the timeout when fullscreening, but not when moving the pointer away. Make the timeout as small as possible, just enough for the fullscreen animation to end.
-rw-r--r--src/ephy-fullscreen-box.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ephy-fullscreen-box.c b/src/ephy-fullscreen-box.c
index 36c30d5eb..397067ad7 100644
--- a/src/ephy-fullscreen-box.c
+++ b/src/ephy-fullscreen-box.c
@@ -23,7 +23,7 @@
#include <handy.h>
-#define INACTIVITY_TIME_MS 3000
+#define FULLSCREEN_HIDE_DELAY 300
#define SHOW_HEADERBAR_DISTANCE_PX 5
struct _EphyFullscreenBox {
@@ -99,7 +99,9 @@ start_hide_timeout (EphyFullscreenBox *self)
if (self->timeout_id)
return;
- self->timeout_id = g_timeout_add (INACTIVITY_TIME_MS, (GSourceFunc)hide_timeout_cb, self);
+ self->timeout_id = g_timeout_add (FULLSCREEN_HIDE_DELAY,
+ (GSourceFunc)hide_timeout_cb,
+ self);
}
static gboolean
@@ -167,7 +169,7 @@ motion_cb (EphyFullscreenBox *self,
self->is_touch = FALSE;
self->last_y = y;
- update (self, FALSE);
+ update (self, TRUE);
}
static void