{"id":135,"date":"2019-08-01T21:48:37","date_gmt":"2019-08-01T18:48:37","guid":{"rendered":"http:\/\/sanana.kiev.ua\/?p=135"},"modified":"2019-08-05T18:30:35","modified_gmt":"2019-08-05T15:30:35","slug":"%d0%be%d1%87%d0%b5%d1%80%d0%b5%d0%b4%d0%bd%d1%8b%d0%b5-%d1%81%d1%82%d1%80%d0%b0%d0%bd%d0%bd%d0%be%d1%81%d1%82%d0%b8-gtk3","status":"publish","type":"post","link":"https:\/\/sanana.kiev.ua\/index.php\/archives\/135","title":{"rendered":"\u041e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438 gtk3"},"content":{"rendered":"<p>\u041f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043c\u0435\u043d\u044e. \u041f\u043e &#8220;\u0433\u043e\u0440\u044f\u0447\u0435\u0439 \u043a\u043b\u0430\u0432\u0438\u0448\u0435&#8221;. \u0418\u0437 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430. \u0415\u0441\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u043a\u0430\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u043b\u0438\u0431\u0430 &#8211; <a href=\"https:\/\/github.com\/kupferlauncher\/keybinder\" target=\"_blank\" rel=\"noopener noreferrer\">keybinder<\/a>. \u0418 \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u0431\u0430 \u0445\u043e\u0440\u043e\u0448\u0430, \u0438 \u0432 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e, \u0442.\u043a. \u0432 \u043b\u0438\u0431\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u0434\u043e\u043c. \u0412 \u043e\u0431\u0449\u0435\u043c &#8211; \u043f\u0440\u0435\u043b\u0435\u0441\u0442\u044c. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u043d\u044e \u0438\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0445\u043e\u0442\u043a\u0435\u0435\u0432 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0436\u0435\u043b\u0430\u0435\u0442, \u0445\u043e\u0442\u044c \u0442\u044b \u0442\u0440\u0435\u0441\u043d\u0438. \u041b\u044e\u0431\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 &#8211; \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430. \u041c\u0435\u043d\u044e &#8211; \u0445\u0440\u0435\u043d \u0442\u0435\u0431\u0435 \u043d\u0430 \u0432\u043e\u0440\u043e\u0442\u043d\u0438\u043a, \u0430 \u043d\u0435 \u043c\u0435\u043d\u044e. \u041f\u0440\u0438\u0447\u0435\u043c, \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u043d\u044e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u0434\u0435\u0440\u0433\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b GApplication. \u0422\u0430\u043a\u0430\u044f \u0432\u043e\u0442 \u043e\u043c\u0435\u0440\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p><!--more--><\/p>\n<p>\u0417\u0430\u0431\u0430\u0432\u043d\u043e, \u0447\u0442\u043e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 gtk3, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u043a\u0443\u0441\u044b \u0441 gtk2 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0443\u0440\u0430. \u0418\u0441\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0431\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439. \u0417\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 workaround<\/p>\n<pre style=\"color: #d0d0d0; background-color: #1c1c1c; font-size: 10pt; font-family: 'Courier New',monospace;\"><span style=\"color: #de87da;\">gtk_widget_realize<\/span> <span style=\"color: #888888;\">(<\/span>menu<span style=\"color: #888888;\">);<\/span>\r\n<span style=\"color: #87afdf;\">do<\/span>\r\n  <span style=\"color: #888888;\">{<\/span>\r\n    <span style=\"color: #de87da;\">gtk_menu_popup_at_widget<\/span> <span style=\"color: #888888;\">(<\/span><span style=\"color: #de87da;\">GTK_MENU<\/span> <span style=\"color: #888888;\">(<\/span>menu<span style=\"color: #888888;\">),<\/span> win<span style=\"color: #888888;\">,<\/span> GDK_GRAVITY_CENTER<span style=\"color: #888888;\">,<\/span> GDK_GRAVITY_CENTER<span style=\"color: #888888;\">,<\/span> fake_ev<span style=\"color: #888888;\">);<\/span>\r\n    <span style=\"color: #de87da;\">gtk_main_iteration<\/span> <span style=\"color: #888888;\">();<\/span>\r\n  <span style=\"color: #888888;\">}<\/span>\r\n<span style=\"color: #87afdf;\">while<\/span> <span style=\"color: #888888;\">(!<\/span><span style=\"color: #de87da;\">gtk_widget_get_visible<\/span> <span style=\"color: #888888;\">(<\/span>menu<span style=\"color: #888888;\">));<\/span>\r\n<\/pre>\n<p><code>fake_ev<\/code> \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 &#8211; \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0443\u043a\u0430\u043c\u0438 <code>GdkEvent<\/code><\/p>\n<pre style=\"color: #d0d0d0; background-color: #1c1c1c; font-size: 10pt; font-family: 'Courier New',monospace;\">disp <span style=\"color: #888888;\">=<\/span> <span style=\"color: #de87da;\">gdk_display_get_default<\/span> <span style=\"color: #888888;\">();<\/span>\r\n\r\nfake_ev <span style=\"color: #888888;\">=<\/span> <span style=\"color: #de87da;\">gdk_event_new<\/span> <span style=\"color: #888888;\">(<\/span>GDK_BUTTON_PRESS<span style=\"color: #888888;\">);<\/span>\r\n<span style=\"color: #888888;\">((<\/span>GdkEventButton <span style=\"color: #888888;\">*)<\/span> fake_ev<span style=\"color: #888888;\">)-&gt;<\/span>button <span style=\"color: #888888;\">=<\/span> <span style=\"color: #dfaf87;\">1<\/span><span style=\"color: #888888;\">;<\/span>\r\n<span style=\"color: #888888;\">((<\/span>GdkEventButton <span style=\"color: #888888;\">*)<\/span> fake_ev<span style=\"color: #888888;\">)-&gt;<\/span>window <span style=\"color: #888888;\">=<\/span> <span style=\"color: #de87da;\">gtk_widget_get_window<\/span> <span style=\"color: #888888;\">(<\/span>win<span style=\"color: #888888;\">);<\/span>\r\n<span style=\"color: #888888;\">((<\/span>GdkEventButton <span style=\"color: #888888;\">*)<\/span> fake_ev<span style=\"color: #888888;\">)-&gt;<\/span>send_event <span style=\"color: #888888;\">=<\/span> TRUE<span style=\"color: #888888;\">;<\/span>\r\n<span style=\"color: #888888;\">((<\/span>GdkEventButton <span style=\"color: #888888;\">*)<\/span> fake_ev<span style=\"color: #888888;\">)-&gt;<\/span>time <span style=\"color: #888888;\">=<\/span> GDK_CURRENT_TIME<span style=\"color: #888888;\">;<\/span>\r\n<span style=\"color: #888888;\">((<\/span>GdkEventButton <span style=\"color: #888888;\">*)<\/span> fake_ev<span style=\"color: #888888;\">)-&gt;<\/span>device <span style=\"color: #888888;\">=<\/span> <span style=\"color: #de87da;\">gdk_seat_get_pointer<\/span> <span style=\"color: #888888;\">(<\/span><span style=\"color: #de87da;\">gdk_display_get_default_seat<\/span> <span style=\"color: #888888;\">(<\/span>disp<span style=\"color: #888888;\">));<\/span>\r\n<\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0432\u043e\u0442 \u043f\u0435\u0440\u0432\u0435\u0440\u0446\u0438\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0437\u0431\u043e\u0447\u0438\u043d\u0441\u0442\u0432\u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043b\u043e\u0434\u0438\u0442\u044c<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043c\u0435\u043d\u044e. \u041f\u043e &#8220;\u0433\u043e\u0440\u044f\u0447\u0435\u0439 \u043a\u043b\u0430\u0432\u0438\u0448\u0435&#8221;. \u0418\u0437 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430. \u0415\u0441\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u043a\u0430\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u043b\u0438\u0431\u0430 &#8211; keybinder. \u0418 \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u0431\u0430 \u0445\u043e\u0440\u043e\u0448\u0430, \u0438 \u0432 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e, \u0442.\u043a. \u0432 \u043b\u0438\u0431\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u0434\u043e\u043c. \u0412 \u043e\u0431\u0449\u0435\u043c &#8211; \u043f\u0440\u0435\u043b\u0435\u0441\u0442\u044c. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u043d\u044e \u0438\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0445\u043e\u0442\u043a\u0435\u0435\u0432 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0436\u0435\u043b\u0430\u0435\u0442, \u0445\u043e\u0442\u044c \u0442\u044b \u0442\u0440\u0435\u0441\u043d\u0438. \u041b\u044e\u0431\u043e\u0435 &hellip; <a href=\"https:\/\/sanana.kiev.ua\/index.php\/archives\/135\" class=\"more-link\">\u041f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u0447\u0438\u0442\u0430\u043d\u043d\u044f<span class=\"screen-reader-text\"> &#8220;\u041e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438 gtk3&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[17],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-desktop","category-tipstricks","tag-gtk3"],"_links":{"self":[{"href":"https:\/\/sanana.kiev.ua\/index.php\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sanana.kiev.ua\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sanana.kiev.ua\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sanana.kiev.ua\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sanana.kiev.ua\/index.php\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":5,"href":"https:\/\/sanana.kiev.ua\/index.php\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":146,"href":"https:\/\/sanana.kiev.ua\/index.php\/wp-json\/wp\/v2\/posts\/135\/revisions\/146"}],"wp:attachment":[{"href":"https:\/\/sanana.kiev.ua\/index.php\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sanana.kiev.ua\/index.php\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sanana.kiev.ua\/index.php\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}