GDK_POINTER_MOTION_HINT_MASK
- From: antonio <antonio_macchi alice it>
- To: gtk-app-devel-list gnome org
- Subject: GDK_POINTER_MOTION_HINT_MASK
- Date: Fri, 08 May 2009 16:56:14 +0200
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) and in
the last version, 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;
}
-----
I mean: moving only "inside" the window I get messages over and over
thanks for all
by
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]