{"id":2258,"date":"2009-02-22T17:00:54","date_gmt":"2009-02-22T08:00:54","guid":{"rendered":"http:\/\/yasu2.prosou.nu\/blog\/index.php\/2009\/02\/22\/gtk-quartz_and_gdkmodifiertype\/"},"modified":"2009-02-22T17:00:54","modified_gmt":"2009-02-22T08:00:54","slug":"gtk-quartz_and_gdkmodifiertype","status":"publish","type":"post","link":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/2009\/02\/22\/2258\/","title":{"rendered":"GTK+-Quartz and GdkModifierType"},"content":{"rendered":"<p>On MacBook and other Apple&#8217;s laptops, X11.app emulates right-button click by command key + click. I have to do this by myself because GTK+-Quartz doesn&#8217;t (and of course, my MacBook has only 1 button to click).<br \/>\nI&#8217;ve tried to sense shift, ctrl and command key in my motion-notify event handler and button-press event handler. That&#8217;s reasonably possible by gdk_window_get_pointer(). However, gdk_window_get_pointer() doesn&#8217;t work as <a href=\"http:\/\/developer.imendio.com\/node\/324\">we&#8217;ve discussed on Imendio GTK+-Quartz developer forum<\/a>.<br \/>\nInstead, struct GdkEventMotion given by motion-notify event itself has a &#8220;state&#8221; member, that is a GdkModifierType (I didn&#8217;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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On MacBook and other Apple&#8217;s laptops, X11.app emulates right-button click by command key + click. I have &hellip; <a href=\"https:\/\/yasu2.prosou.nu\/blog\/index.php\/2009\/02\/22\/2258\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;GTK+-Quartz and GdkModifierType&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[9,6],"tags":[],"class_list":["post-2258","post","type-post","status-publish","format-standard","hentry","category-mac","category-unix-"],"_links":{"self":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=2258"}],"version-history":[{"count":0,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2258\/revisions"}],"wp:attachment":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=2258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=2258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=2258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}