From: dooglus Date: Wed, 6 Feb 2008 11:12:44 +0000 (+0000) Subject: Allow manual editing of the current time in the workarea window. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9d16b540d4311948c2fc91f765d24c2926e2c62b;p=synfig.git Allow manual editing of the current time in the workarea window. git-svn-id: http://svn.voria.com/code@1603 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/widget_time.cpp b/synfig-studio/trunk/src/gtkmm/widget_time.cpp index e818c65..f842ab8 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_time.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_time.cpp @@ -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; } diff --git a/synfig-studio/trunk/src/gtkmm/workarea.cpp b/synfig-studio/trunk/src/gtkmm/workarea.cpp index c940d86..22b0526 100644 --- a/synfig-studio/trunk/src/gtkmm/workarea.cpp +++ b/synfig-studio/trunk/src/gtkmm/workarea.cpp @@ -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