gtk_adjustment_set_value (clist->vadjustment, value);
}
-static gint
-horizontal_timeout (GtkCList *clist)
+static void
+do_fake_motion (GtkWidget *widget)
{
- GdkEventMotion event;
+ GdkEvent *event = gdk_event_new (GDK_MOTION_NOTIFY);
- memset (&event, 0, sizeof (event));
+ event->motion.send_event = TRUE;
+ gtk_clist_motion (widget, (GdkEventMotion *)event);
+ gdk_event_free (event);
+}
+
+static gint
+horizontal_timeout (GtkCList *clist)
+{
GDK_THREADS_ENTER ();
clist->htimer = 0;
-
- event.type = GDK_MOTION_NOTIFY;
- event.send_event = TRUE;
-
- gtk_clist_motion (GTK_WIDGET (clist), &event);
+ do_fake_motion (GTK_WIDGET (clist));
GDK_THREADS_LEAVE ();
static gint
vertical_timeout (GtkCList *clist)
{
- GdkEventMotion event;
-
- memset (&event, 0, sizeof (event));
-
GDK_THREADS_ENTER ();
clist->vtimer = 0;
-
- event.type = GDK_MOTION_NOTIFY;
- event.send_event = TRUE;
-
- gtk_clist_motion (GTK_WIDGET (clist), &event);
+ do_fake_motion (GTK_WIDGET (clist));
GDK_THREADS_LEAVE ();