summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-23 01:47:23 +0000
committerDavid Robillard <d@drobilla.net>2012-05-23 01:47:23 +0000
commit1046c926c89dec8219fe7f94a7739b1f8a0e6277 (patch)
tree3ec9f651655d6af3538d4bb0e41ae92f96390c7d /src/gui
parent7ca44cb8800a2800e58fadd0267416224650e08d (diff)
downloadingen-1046c926c89dec8219fe7f94a7739b1f8a0e6277.tar.gz
ingen-1046c926c89dec8219fe7f94a7739b1f8a0e6277.tar.bz2
ingen-1046c926c89dec8219fe7f94a7739b1f8a0e6277.zip
Update status bar only for control ports with the pointer over them.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4443 a436a847-0d15-0410-975c-d299462d15a1
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;
};