mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Allow touch to tigger act-on-release events
This commit is contained in:
parent
8eab71fef4
commit
7e8230c3be
2 changed files with 8 additions and 3 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#include "pbd/compose.h"
|
||||
#include "pbd/controllable.h"
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/unwind.h"
|
||||
|
||||
#include "gtkmm2ext/colors.h"
|
||||
#include "gtkmm2ext/gui_thread.h"
|
||||
|
|
@ -92,6 +93,7 @@ ArdourButton::ArdourButton (Element e, bool toggle)
|
|||
, _led_left (false)
|
||||
, _distinct_led_click (false)
|
||||
, _hovering (false)
|
||||
, _touching (false)
|
||||
, _focused (false)
|
||||
, _fixed_colors_set (false)
|
||||
, _fallthrough_to_parent (false)
|
||||
|
|
@ -142,6 +144,7 @@ ArdourButton::ArdourButton (const std::string& str, Element e, bool toggle)
|
|||
, _led_left (false)
|
||||
, _distinct_led_click (false)
|
||||
, _hovering (false)
|
||||
, _touching (false)
|
||||
, _focused (false)
|
||||
, _fixed_colors_set (false)
|
||||
, _fallthrough_to_parent (false)
|
||||
|
|
@ -989,7 +992,8 @@ ArdourButton::on_touch_begin_event (GdkEventTouch *ev)
|
|||
bev.state = 0;
|
||||
bev.axes = NULL;
|
||||
bev.device = NULL;
|
||||
_hovering = true;
|
||||
_touching = true;
|
||||
PBD::Unwinder<bool> uw (_hovering, true);
|
||||
return event ((GdkEvent*)&bev);
|
||||
}
|
||||
|
||||
|
|
@ -1011,8 +1015,8 @@ ArdourButton::on_touch_end_event (GdkEventTouch *ev)
|
|||
bev.state = 0;
|
||||
bev.axes = NULL;
|
||||
bev.device = NULL;
|
||||
|
||||
_hovering = false;
|
||||
PBD::Unwinder<bool> uw (_hovering, _touching);
|
||||
_touching = false;
|
||||
return event ((GdkEvent*)&bev);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ
|
|||
bool _led_left;
|
||||
bool _distinct_led_click;
|
||||
bool _hovering;
|
||||
bool _touching;
|
||||
bool _focused;
|
||||
int _fixed_colors_set;
|
||||
bool _fallthrough_to_parent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue