[epiphany/wip/exalm/fullscreen: 3/3] fullscreen-box: Listen to enter signal as well
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/fullscreen: 3/3] fullscreen-box: Listen to enter signal as well
- Date: Tue, 23 Mar 2021 09:36:25 +0000 (UTC)
commit e604296797b90160d829ed3b7c9241b6a0bccabf
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Mar 23 14:31:28 2021 +0500
fullscreen-box: Listen to enter signal as well
If we never moved pointer (for example, just launched the app and pressed
F11), we don't want the header bar to stay until you move it.
src/ephy-fullscreen-box.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/ephy-fullscreen-box.c b/src/ephy-fullscreen-box.c
index 591d2bf99..c435bcb42 100644
--- a/src/ephy-fullscreen-box.c
+++ b/src/ephy-fullscreen-box.c
@@ -155,9 +155,9 @@ update (EphyFullscreenBox *self,
}
static void
-motion_cb (EphyFullscreenBox *self,
- gdouble x,
- gdouble y)
+enter_motion_cb (EphyFullscreenBox *self,
+ gdouble x,
+ gdouble y)
{
self->is_touch = FALSE;
self->last_y = y;
@@ -404,8 +404,10 @@ ephy_fullscreen_box_init (EphyFullscreenBox *self)
self->controller = gtk_event_controller_motion_new (GTK_WIDGET (self));
gtk_event_controller_set_propagation_phase (self->controller, GTK_PHASE_CAPTURE);
+ g_signal_connect_object (self->controller, "enter",
+ G_CALLBACK (enter_motion_cb), self, G_CONNECT_SWAPPED);
g_signal_connect_object (self->controller, "motion",
- G_CALLBACK (motion_cb), self, G_CONNECT_SWAPPED);
+ G_CALLBACK (enter_motion_cb), self, G_CONNECT_SWAPPED);
self->gesture = gtk_gesture_multi_press_new (GTK_WIDGET (self));
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (self->gesture),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]