diff options
| author | Pietro Gagliardi <[email protected]> | 2014-04-14 23:11:28 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-04-14 23:11:28 -0400 |
| commit | da2d4da15a19887c1dd031314d61b1dc2b04ea6d (patch) | |
| tree | 907aaceade5f51d24ee857916a26f8c4d2217743 /area_unix.go | |
| parent | ef7b5648558d046ffa8739c46fa9a4aa4f637d24 (diff) | |
Added click-to-focus to GTK+ Areas and documented that click-to-focus happens; also TODOs related to that.
Diffstat (limited to 'area_unix.go')
| -rw-r--r-- | area_unix.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/area_unix.go b/area_unix.go index 71a9edb..cfa5741 100644 --- a/area_unix.go +++ b/area_unix.go @@ -141,6 +141,8 @@ func finishMouseEvent(widget *C.GtkWidget, data C.gpointer, me MouseEvent, mb ui //export our_area_button_press_event_callback func our_area_button_press_event_callback(widget *C.GtkWidget, event *C.GdkEvent, data C.gpointer) C.gboolean { + // clicking doesn't automatically transfer keyboard focus; we must do so manually (thanks tristan in irc.gimp.net/#gtk+) + C.gtk_widget_grab_focus(widget) e := (*C.GdkEventButton)(unsafe.Pointer(event)) me := MouseEvent{ // GDK button ID == our button ID |
