From 23d95e1bcac920478e18e3a14ed086c4119d427d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 2 Nov 2014 11:25:31 -0500 Subject: [PATCH] repropagate button press event outside of FloatingTextEntry so that the click is still effective, as well as terminating the edit --- gtk2_ardour/floating_text_entry.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; }