{"id":2262,"date":"2015-10-27T22:55:17","date_gmt":"2015-10-27T22:55:17","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=2262"},"modified":"2020-04-07T14:27:14","modified_gmt":"2020-04-07T14:27:14","slug":"mouse-cursor","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/programming-in-c\/gui-programming-in-c\/gtk\/mouse\/mouse-cursor","title":{"rendered":"Mouse Cursor"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Hide the mouse cursor<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\n\tgtk_widget_show_all(MainWindow);\n\t\n\t\/\/Hide the mouse pointer\n\tGdkCursor *mouse_cursor;\n\tmouse_cursor = gdk_cursor_new(GDK_BLANK_CURSOR);\n\tgdk_window_set_cursor(gtk_widget_get_window(MainWindow), mouse_cursor);\n<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Mouse pointer appears after a button press<\/h5>\n\n\n\n<p>We&#8217;ve found this can occur and seems like a gtk bug.  Moving the mouse will cause the pointer to immediately vanish, so the pointer is supposed to be hidden still.<\/p>\n\n\n\n<p>Updating the screen content by say updating an image or text widget wouldn&#8217;t remove the mouse cursor.  Fix was to trigger our new screen appearing from the release event instead of the original touch event on the button that was used to cause it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hide the mouse cursor Mouse pointer appears after a button press We&#8217;ve found this can occur and seems like a gtk bug. Moving the mouse will cause the pointer to immediately vanish, so the pointer is supposed to be hidden still. Updating the screen content by say updating an image or text widget wouldn&#8217;t remove [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[112],"tags":[],"class_list":["post-2262","post","type-post","status-publish","format-standard","hentry","category-mouse"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/2262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=2262"}],"version-history":[{"count":6,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/2262\/revisions"}],"predecessor-version":[{"id":3220,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/2262\/revisions\/3220"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=2262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=2262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=2262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}