Hello,
Perhaps you could have something as the code below (it works for me. It is based in GtkGlArea / GtkGLExt examples and discussions in this list with Havoc Pennington years ago)int callback_area_notify (GtkWidget *widget, GdkEventMotion *event, void *data) { my_structure *structure = (my_structure *) data; GdkModifierType state; int width = widget->allocation.width; int height = widget->allocation.height; int x, y;if (event->is_hint) gdk_window_get_pointer (event->window, &x, &y, &state);else { x = event->x; y = event->y; state = event->state;}
Thank you. I'll try this.Though at this point I don't understand one part.. In my callback I never call gdk_window_get_pointer() nor gdk_event_request_motions(). Because of that I would expect that my callback is called only once, the first time. Instead of that, it's called basically constantly (but as I said I found out some other code than me is calling gdk_window_get_pointer() potentially causing that phenomenon). In your code you don't seem to be skipping some incoming events so I would expect the same result as what I'm seeing now?
Is it in fact possible to achieve that I get called only when I say that I'm ready? I guess it is... Anyway, I'll try what you wrote, thank you. But somehow I think it's not going to solve my problem. Maybe I'll have to make a small test program to understand my problem.
emmanuel