GTK+-Quartz and GdkModifierType

| No Comments | No TrackBacks

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.

No TrackBacks

TrackBack URL: http://yasu2.prosou.nu/mt/mt-tb.cgi/1881

Leave a comment

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.02

August 2010

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Yasunori Osana published on February 22, 2009 5:00 PM.

くまー was the previous entry in this blog.

Zippo is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.