CList and Gdk events
- From: Paolo Molaro <lupus lettere unipd it>
- To: gtk-devel-list gnome org
- Subject: CList and Gdk events
- Date: Fri, 26 May 2000 19:04:33 +0200
Hi.
Tracking down a bug report for gtk-perl I found that GtkCList
misbehaves regarding GdkEvents.
In order to support autoscrolling (ie scrolling the list holding
down a mouse button and moving), it installs a timeout handler
and synthetises a motion event without filling in all the needed
fields.
The attached patch fixes the problem in an obvious manner, but I guees
the proper fix would be to actually copy and store the event itself
instead of generating one later. I will provide an updated patch if
there is consensus.
Probably there should be some documentation about invariants for
GdkEvents (for example motion events must have the window field set),
or any place that synthetises events should be carefully checked.
lupus
--
Paolo Molaro, Open Source Developer, Linuxcare, Inc.
+39.049.8043411 tel, +39.049.8043412 fax
lupus@linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.
Index: gtkclist.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkclist.c,v
retrieving revision 1.167
diff -u -r1.167 gtkclist.c
--- gtkclist.c 2000/05/12 15:25:38 1.167
+++ gtkclist.c 2000/05/26 16:48:34
@@ -7124,6 +7124,7 @@
event.type = GDK_MOTION_NOTIFY;
event.send_event = TRUE;
+ event.window = clist->clist_window;
gtk_clist_motion (GTK_WIDGET (clist), &event);
@@ -7143,6 +7144,7 @@
event.type = GDK_MOTION_NOTIFY;
event.send_event = TRUE;
+ event.window = clist->clist_window;
gtk_clist_motion (GTK_WIDGET (clist), &event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]