summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/Port.cpp17
-rw-r--r--src/gui/Port.hpp1
2 files changed, 11 insertions, 7 deletions
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index 982e586f..5e847400 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -73,6 +73,7 @@ Port::Port(App& app,
, _app(app)
, _port_model(pm)
, _pressed(false)
+ , _entered(false)
, _flipped(flip)
{
assert(pm);
@@ -151,9 +152,11 @@ Port::on_value_changed(GVariant* value)
atom);
}
- PatchBox* box = get_patch_box();
- if (box) {
- box->show_port_status(model().get(), atom);
+ if (_entered) {
+ PatchBox* box = get_patch_box();
+ if (box) {
+ box->show_port_status(model().get(), atom);
+ }
}
}
@@ -199,14 +202,14 @@ Port::on_event(GdkEvent* ev)
PatchBox* box = NULL;
switch (ev->type) {
case GDK_ENTER_NOTIFY:
- box = get_patch_box();
- if (box) {
+ _entered = true;
+ if ((box = get_patch_box())) {
box->object_entered(model().get());
}
break;
case GDK_LEAVE_NOTIFY:
- box = get_patch_box();
- if (box) {
+ _entered = false;
+ if ((box = get_patch_box())) {
box->object_left(model().get());
}
break;
diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp
index 0e5ad508..66f30f79 100644
--- a/src/gui/Port.hpp
+++ b/src/gui/Port.hpp
@@ -84,6 +84,7 @@ private:
App& _app;
WeakPtr<const Client::PortModel> _port_model;
bool _pressed : 1;
+ bool _entered : 1;
bool _flipped : 1;
};