Allow manual editing of the current time in the workarea window.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 6 Feb 2008 11:12:44 +0000 (11:12 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 6 Feb 2008 11:12:44 +0000 (11:12 +0000)
git-svn-id: http://svn.voria.com/code@1603 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/widget_time.cpp
synfig-studio/trunk/src/gtkmm/workarea.cpp

index e818c65..f842ab8 100644 (file)
@@ -133,6 +133,12 @@ Widget_Time::on_event(GdkEvent* event)
                }
                return true;
                break;
+       case GDK_BUTTON_PRESS:
+       case GDK_2BUTTON_PRESS:
+       case GDK_3BUTTON_PRESS:
+               if (!has_focus())
+                       grab_focus();
+               break;
        default:
                break;
        }
index c940d86..22b0526 100644 (file)
@@ -1199,8 +1199,6 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
        bool is_mouse(false);
        Gdk::ModifierType modifier(Gdk::ModifierType(0));
 
-       drawing_area->grab_focus();
-
        // Handle input stuff
        if(
                event->any.type==GDK_MOTION_NOTIFY ||
@@ -1220,6 +1218,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                {
                        device=event->button.device;
                        modifier=Gdk::ModifierType(event->button.state);
+                       drawing_area->grab_focus();
                }
 
                // Make sure we recognize the device