From: Jim Evins Date: Wed, 18 Nov 2009 14:08:20 +0000 (-0500) Subject: Fixed focus behavior of view canvas X-Git-Tag: glabels-2_3_0~132 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d6fb9999d0996c1c3528de406e486efce5bb5511;p=glabels Fixed focus behavior of view canvas Fixes bug #2899305. Don't just automatically steal focus when entering canvas. Require a click to get focus back. --- diff --git a/src/view.c b/src/view.c index 84b36a1f..ca917342 100644 --- a/src/view.c +++ b/src/view.c @@ -3263,8 +3263,6 @@ static gboolean enter_notify_event_cb (glView *view, GdkEventCrossing *event) { - gtk_widget_grab_focus(GTK_WIDGET (view->canvas)); - return FALSE; } @@ -3456,6 +3454,8 @@ button_press_event_cb (glView *view, glViewObject *view_object; glViewObjectHandle handle; + gtk_widget_grab_focus(GTK_WIDGET (view->canvas)); + bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (view->canvas)); cr = gdk_cairo_create (bin_window);