diff options
author | Ernestas Kulik <ernestask@src.gnome.org> | 2016-10-18 18:52:20 +0300 |
---|---|---|
committer | Ernestas Kulik <ernestask@src.gnome.org> | 2016-11-03 13:21:01 +0200 |
commit | 0880338015260541219fa337c59f2f0dabd7c524 (patch) | |
tree | ef70eb5df9c288ecf52f90c4eb1bf5711d6b5461 /src/nautilus-floating-bar.c | |
parent | 01476a1e9acdea7a8e5a14ca9a7394acd8dc9263 (diff) | |
download | nautilus-0880338015260541219fa337c59f2f0dabd7c524.tar.gz |
floating-bar: fix hide on hover with notebook visible
When the notebook is visible, the pointer intersection with the floating
bar check fails. That is due to how the floating bar bounds are
calculated - the offset of the overlay when tabs are visible is not
taken into account, allowing the upper y bound to become smaller than
the lower bound. That can be fixed by calculating the upper y bound
relative to the lower one.
https://bugzilla.gnome.org/show_bug.cgi?id=773119
Diffstat (limited to 'src/nautilus-floating-bar.c')
-rw-r--r-- | src/nautilus-floating-bar.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nautilus-floating-bar.c b/src/nautilus-floating-bar.c index dc866c013..2a6a2c5cc 100644 --- a/src/nautilus-floating-bar.c +++ b/src/nautilus-floating-bar.c @@ -231,7 +231,6 @@ overlay_enter_notify_cb (GtkWidget *parent, { GtkWidget *widget = user_data; CheckPointerData *data; - GtkAllocation alloc_parent; gint y_pos; NautilusFloatingBar *self = NAUTILUS_FLOATING_BAR (widget); @@ -251,7 +250,6 @@ overlay_enter_notify_cb (GtkWidget *parent, return GDK_EVENT_PROPAGATE; } - gtk_widget_get_allocation (parent, &alloc_parent); gdk_window_get_position (gtk_widget_get_window (widget), NULL, &y_pos); data = g_slice_new (CheckPointerData); @@ -259,7 +257,7 @@ overlay_enter_notify_cb (GtkWidget *parent, data->floating_bar = widget; data->device = gdk_event_get_device ((GdkEvent *) event); data->y_down_limit = y_pos; - data->y_upper_limit = alloc_parent.height; + data->y_upper_limit = y_pos + gtk_widget_get_allocated_height (widget); self->priv->hover_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, HOVER_HIDE_TIMEOUT_INTERVAL, check_pointer_timeout, data, |