From affbc828b37eef8decdd8294f0bc645f6de87f2f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 15 Apr 2000 04:34:03 +0000 Subject: [PATCH] gtk/gtkclist.c (gtk_clist_motion) If we get a motion event with is_hint 2000-04-15 Tor Lillqvist * gtk/gtkclist.c (gtk_clist_motion) * gtk/gtklist.c (gtk_list_motion_notify): If we get a motion event with is_hint FALSE, get x and y from the event. They used to be used uninitialised. The Win32 backend never sends motion events marked as hints. This for instance fixes the annoying file and font selector behaviour in the Win32 version. --- ChangeLog | 9 +++++++++ ChangeLog.pre-2-0 | 9 +++++++++ ChangeLog.pre-2-10 | 9 +++++++++ ChangeLog.pre-2-2 | 9 +++++++++ ChangeLog.pre-2-4 | 9 +++++++++ ChangeLog.pre-2-6 | 9 +++++++++ ChangeLog.pre-2-8 | 9 +++++++++ gtk/gtkclist.c | 5 +++++ gtk/gtklist.c | 5 +++++ 9 files changed, 73 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3cbf8fa93d..32cac4d777 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-04-15 Tor Lillqvist + + * gtk/gtkclist.c (gtk_clist_motion) + * gtk/gtklist.c (gtk_list_motion_notify): If we get a motion event + with is_hint FALSE, get x and y from the event. They used to be + used uninitialised. The Win32 backend never sends motion events + marked as hints. This for instance fixes the annoying file and + font selector behaviour in the Win32 version. + 2000-04-14 Tor Lillqvist * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 3cbf8fa93d..32cac4d777 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +2000-04-15 Tor Lillqvist + + * gtk/gtkclist.c (gtk_clist_motion) + * gtk/gtklist.c (gtk_list_motion_notify): If we get a motion event + with is_hint FALSE, get x and y from the event. They used to be + used uninitialised. The Win32 backend never sends motion events + marked as hints. This for instance fixes the annoying file and + font selector behaviour in the Win32 version. + 2000-04-14 Tor Lillqvist * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3cbf8fa93d..32cac4d777 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2000-04-15 Tor Lillqvist + + * gtk/gtkclist.c (gtk_clist_motion) + * gtk/gtklist.c (gtk_list_motion_notify): If we get a motion event + with is_hint FALSE, get x and y from the event. They used to be + used uninitialised. The Win32 backend never sends motion events + marked as hints. This for instance fixes the annoying file and + font selector behaviour in the Win32 version. + 2000-04-14 Tor Lillqvist * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 3cbf8fa93d..32cac4d777 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +2000-04-15 Tor Lillqvist + + * gtk/gtkclist.c (gtk_clist_motion) + * gtk/gtklist.c (gtk_list_motion_notify): If we get a motion event + with is_hint FALSE, get x and y from the event. They used to be + used uninitialised. The Win32 backend never sends motion events + marked as hints. This for instance fixes the annoying file and + font selector behaviour in the Win32 version. + 2000-04-14 Tor Lillqvist * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 3cbf8fa93d..32cac4d777 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +2000-04-15 Tor Lillqvist + + * gtk/gtkclist.c (gtk_clist_motion) + * gtk/gtklist.c (gtk_list_motion_notify): If we get a motion event + with is_hint FALSE, get x and y from the event. They used to be + used uninitialised. The Win32 backend never sends motion events + marked as hints. This for instance fixes the annoying file and + font selector behaviour in the Win32 version. + 2000-04-14 Tor Lillqvist * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 3cbf8fa93d..32cac4d777 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +2000-04-15 Tor Lillqvist + + * gtk/gtkclist.c (gtk_clist_motion) + * gtk/gtklist.c (gtk_list_motion_notify): If we get a motion event + with is_hint FALSE, get x and y from the event. They used to be + used uninitialised. The Win32 backend never sends motion events + marked as hints. This for instance fixes the annoying file and + font selector behaviour in the Win32 version. + 2000-04-14 Tor Lillqvist * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 3cbf8fa93d..32cac4d777 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2000-04-15 Tor Lillqvist + + * gtk/gtkclist.c (gtk_clist_motion) + * gtk/gtklist.c (gtk_list_motion_notify): If we get a motion event + with is_hint FALSE, get x and y from the event. They used to be + used uninitialised. The Win32 backend never sends motion events + marked as hints. This for instance fixes the annoying file and + font selector behaviour in the Win32 version. + 2000-04-14 Tor Lillqvist * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index 34396b6295..c01095a234 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -5266,6 +5266,11 @@ gtk_clist_motion (GtkWidget *widget, if (event->is_hint || event->window != clist->clist_window) gdk_window_get_pointer (clist->clist_window, &x, &y, NULL); + else + { + x = event->x; + y = event->y; + } if (GTK_CLIST_REORDERABLE(clist) && button_actions & GTK_BUTTON_DRAGS) { diff --git a/gtk/gtklist.c b/gtk/gtklist.c index f4239604a8..a114dcad75 100644 --- a/gtk/gtklist.c +++ b/gtk/gtklist.c @@ -563,6 +563,11 @@ gtk_list_motion_notify (GtkWidget *widget, if (event->is_hint || event->window != widget->window) gdk_window_get_pointer (widget->window, &x, &y, NULL); + else + { + x = event->x; + y = event->y; + } adj = gtk_object_get_data_by_id (GTK_OBJECT (list), hadjustment_key_id);