Getting mouse movement, motion-notify-event problem



Hi

Im trying to get the location of the mouse using "motion-notify-event"
like this:

gint events = gtk_widget_get_events(GTK_WIDGET(window));
gtk_widget_set_events(GTK_WIDGET(window), events | GDK_POINTER_MOTION_MASK);
g_signal_connect(G_OBJECT(window), "motion-notify-event",
                G_CALLBACK(motion_notify_event), NULL);

But those events stop coming if i press the any mouse button down and
move the mouse. Events resume when i lift the button. How do i get mouse
movement at all times?

--
Arto Karppinen







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