]> git.sur5r.net Git - glabels/commitdiff
Fixed focus behavior of view canvas
authorJim Evins <evins@snaught.com>
Wed, 18 Nov 2009 14:16:14 +0000 (09:16 -0500)
committerJim Evins <evins@snaught.com>
Wed, 18 Nov 2009 14:16:14 +0000 (09:16 -0500)
Fixes bug #2899305.  Don't just automatically steal focus when entering
canvas.  Require a click to get focus back.

src/view.c

index f7ad1850a253cf19e2b12a1a225a1d2315b2ef04..ffe8c5d9c5a18753f8688c763fde056c8a57b84e 100644 (file)
@@ -3158,8 +3158,6 @@ static gboolean
 enter_notify_event_cb (glView            *view,
                        GdkEventCrossing  *event)
 {
-        gtk_widget_grab_focus(GTK_WIDGET (view->canvas));
-
         return FALSE;
 }
 
@@ -3342,6 +3340,8 @@ button_press_event_cb (glView            *view,
         glViewObject       *view_object;
         glViewObjectHandle  handle;
 
+        gtk_widget_grab_focus(GTK_WIDGET (view->canvas));
+
        cr = gdk_cairo_create (GTK_LAYOUT (view->canvas)->bin_window);
 
         /*