- int x = 0;
- int y = 0;
- GdkModifierType state;
- gdk_window_get_pointer(gdk_event->window, &x, &y, &state);
- gdk_event->x = x;
- gdk_event->y = y;
+#ifdef __WXGTK3__
+ gdk_window_get_device_position(gdk_event->window, gdk_event->device, &x, &y, NULL);
+#else
+ gdk_window_get_pointer(gdk_event->window, &x, &y, NULL);
+#endif