GTK+-Quartz and GdkModifierType

On MacBook and other Apple’s laptops, X11.app emulates right-button click by command key + click. I have to do this by myself because GTK+-Quartz doesn’t (and of course, my MacBook has only 1 button to click).
I’ve tried to sense shift, ctrl and command key in my motion-notify event handler and button-press event handler. That’s reasonably possible by gdk_window_get_pointer(). However, gdk_window_get_pointer() doesn’t work as we’ve discussed on Imendio GTK+-Quartz developer forum.
Instead, struct GdkEventMotion given by motion-notify event itself has a “state” member, that is a GdkModifierType (I didn’t know, and told by Richard Hult at Imendio. Thanks!). So I can sense the modifier key status straightforwardly in my motion-notify event handler.

コメントを残す