diff options
author | Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr> | 2016-08-18 16:09:50 +0200 |
---|---|---|
committer | Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr> | 2016-08-18 16:16:17 +0200 |
commit | 523306036e0aa57e6e72eacff3a6ee33952af583 (patch) | |
tree | c976cf36055a2ab5cbd5ea9f714022b2f75e2373 /gtk2_ardour/ardour_button.h | |
parent | 0ab81183c0a36b091ed7a51edba85edd48b5e364 (diff) |
Make ArdourButton detect when a grab should stop being pressed
If for whatever reason a grab is taken (e.g. a menu popping up) while
somebody is pressing a mouse button on an ArdourButton, then the
ArdourButton will not get the mouse button release event and will look
stuck in pressed position.
The leave notify event is fired if the mouse is still on the
ArdourButton while the grab is taken, but not if the user was dragging
the mouse outside of the button.
The only reliable way is to listen for the grab_broken_event signal.
Do so.
Diffstat (limited to 'gtk2_ardour/ardour_button.h')
-rw-r--r-- | gtk2_ardour/ardour_button.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_button.h b/gtk2_ardour/ardour_button.h index 78c2f5e369..1128dce97a 100644 --- a/gtk2_ardour/ardour_button.h +++ b/gtk2_ardour/ardour_button.h @@ -124,6 +124,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable void on_realize (); bool on_enter_notify_event (GdkEventCrossing*); bool on_leave_notify_event (GdkEventCrossing*); + bool on_grab_broken_event(GdkEventGrabBroken*); bool on_focus_in_event (GdkEventFocus*); bool on_focus_out_event (GdkEventFocus*); bool on_key_release_event (GdkEventKey *); |