[nautilus] floating-bar: fix hide on hover with notebook visible
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] floating-bar: fix hide on hover with notebook visible
- Date: Thu, 3 Nov 2016 11:21:10 +0000 (UTC)
commit 0880338015260541219fa337c59f2f0dabd7c524
Author: Ernestas Kulik <ernestask src gnome org>
Date: Tue Oct 18 18:52:20 2016 +0300
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
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 dc866c0..2a6a2c5 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]