[gimp] Fix motion event processing on the tag popup's scroll arrows
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] Fix motion event processing on the tag popup's scroll arrows
- Date: Sat, 18 Jul 2009 17:58:49 +0000 (UTC)
commit e564cc2e4e921b87251f1ccd162170e23d822a4b
Author: Michael Natterer <mitch gimp org>
Date: Sat Jul 18 19:57:10 2009 +0200
Fix motion event processing on the tag popup's scroll arrows
Should work properly now wrt detecting the different speed
areas and stopping scolling upon leaving the arrow.
app/widgets/gimptagpopup.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/app/widgets/gimptagpopup.c b/app/widgets/gimptagpopup.c
index 2b7e4c6..6911ede 100644
--- a/app/widgets/gimptagpopup.c
+++ b/app/widgets/gimptagpopup.c
@@ -192,7 +192,6 @@ gimp_tag_popup_init (GimpTagPopup *popup)
g_signal_connect (popup->tag_area, "event",
G_CALLBACK (gimp_tag_popup_list_event),
popup);
-
}
static GObject *
@@ -676,15 +675,13 @@ gimp_tag_popup_border_event (GtkWidget *widget,
else if (event->type == GDK_MOTION_NOTIFY)
{
GdkEventMotion *motion_event = (GdkEventMotion *) event;
+ gint x, y;
- if (motion_event->window == gtk_widget_get_window (widget))
- {
- gint x = motion_event->x + widget->allocation.x;
- gint y = motion_event->y + widget->allocation.y;
+ gdk_window_get_pointer (gtk_widget_get_window (widget), &x, &y, NULL);
- gimp_tag_popup_handle_scrolling (popup, x, y,
- popup->scroll_timeout_id == 0, TRUE);
- }
+ gimp_tag_popup_handle_scrolling (popup, x, y,
+ motion_event->window == widget->window,
+ TRUE);
}
else if (event->type == GDK_BUTTON_RELEASE)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]