summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/App.hpp2
-rw-r--r--src/gui/Port.cpp10
2 files changed, 3 insertions, 9 deletions
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index 1fca42ea..11915949 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -18,8 +18,8 @@
#define INGEN_GUI_APP_HPP
#include <cassert>
-#include <string>
#include <map>
+#include <string>
#include <utility>
#include <gtkmm/aboutdialog.h>
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index ad03bc3b..92775483 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -76,7 +76,6 @@ Port::Port(App& app,
app.style()->get_port_color(pm.get()))
, _app(app)
, _port_model(pm)
- , _pressed(false)
, _entered(false)
, _flipped(flip)
{
@@ -181,7 +180,7 @@ Port::on_value_changed(double value)
void
Port::value_changed(const Atom& value)
{
- if (!_pressed && value.type() == _app.forge().Float) {
+ if (value.type() == _app.forge().Float && !get_grabbed()) {
Ganv::Port::set_control_value(value.get<float>());
}
}
@@ -301,15 +300,10 @@ Port::on_event(GdkEvent* ev)
return true;
}
}
- _pressed = true;
} else if (ev->button.button == 3) {
return show_menu(&ev->button);
}
break;
- case GDK_BUTTON_RELEASE:
- if (ev->button.button == 1) {
- _pressed = false;
- }
default:
break;
}
@@ -416,7 +410,7 @@ Port::property_changed(const Raul::URI& key, const Atom& value)
const URIs& uris = _app.uris();
if (value.type() == uris.forge.Float) {
float val = value.get<float>();
- if (key == uris.ingen_value && !_pressed) {
+ if (key == uris.ingen_value && !get_grabbed()) {
Ganv::Port::set_control_value(val);
} else if (key == uris.lv2_minimum) {
if (model()->port_property(uris.lv2_sampleRate)) {