diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-11-02 11:25:31 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-11-02 11:25:49 -0500 |
commit | 23d95e1bcac920478e18e3a14ed086c4119d427d (patch) | |
tree | dbad8233f023f21af4dc39af4f12d4aabaa8433a /gtk2_ardour/floating_text_entry.cc | |
parent | f76109d8734983e696959df7e7dc62722d621ccf (diff) |
repropagate button press event outside of FloatingTextEntry so that the click is still effective, as well as terminating the edit
Diffstat (limited to 'gtk2_ardour/floating_text_entry.cc')
-rw-r--r-- | gtk2_ardour/floating_text_entry.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/floating_text_entry.cc b/gtk2_ardour/floating_text_entry.cc index 0df7221c84..6808a1f2c1 100644 --- a/gtk2_ardour/floating_text_entry.cc +++ b/gtk2_ardour/floating_text_entry.cc @@ -65,12 +65,18 @@ FloatingTextEntry::button_press (GdkEventButton* ev) /* Clicked outside widget window - edit is done */ + entry.remove_modal_grab (); + + /* arrange re-propagation of the event once we go idle */ + + Glib::signal_idle().connect (sigc::bind_return (sigc::bind (sigc::ptr_fun (gtk_main_do_event), gdk_event_copy ((GdkEvent*) ev)), false)); + if (entry_changed) { use_text (entry.get_text ()); } delete_when_idle ( this); - + return false; } |