GDK_POINTER_MOTION_HINT_MASK



hi at all

the same source code posted here, produce in gtk 2.8.20 (debian etch) a right small amount of events, while in gtk 2.12.12 (debain lenny) produce a large amount of events, as like without this flag

is this ok?


this is the code

-----------------------------------------

#include <gtk/gtk.h>


gboolean window_motion_notify_event(GtkWidget *window, GdkEventMotion *event,
                                   gpointer p);

int main(int argc, char **argv) {
 GtkWidget *window;

 gtk_init(&argc, &argv);
 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 gtk_widget_set_events(window, GDK_POINTER_MOTION_MASK |
                               GDK_POINTER_MOTION_HINT_MASK);
 g_signal_connect(window, "destroy", gtk_main_quit, NULL);
 g_signal_connect(window, "motion_notify_event",
                  G_CALLBACK(window_motion_notify_event), NULL);
 gtk_widget_show(window);
 gtk_main();
 return 0;
}

gboolean window_motion_notify_event(GtkWidget *window, GdkEventMotion *event,
                                   gpointer p) {
 static int i;

 ++i;
 g_print("motion: %d\n", i);
 return FALSE;
}


-----

thanks for all
by



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]