summaryrefslogtreecommitdiff
path: root/otk
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-04 07:55:52 +0000
committerDana Jansens <danakj@orodu.net>2002-12-04 07:55:52 +0000
commit56d7b547ae156e17c8e03ada3b80468f5a0b2605 (patch)
tree155caca7568be2949c7f99468e8cae55327312cb /otk
parent925262bee2d1edfbec1c3fb1725f09cc926b4c7d (diff)
button press/releases WORK
Diffstat (limited to 'otk')
-rw-r--r--otk/eventdispatcher.cc5
-rw-r--r--otk/eventdispatcher.hh7
2 files changed, 11 insertions, 1 deletions
diff --git a/otk/eventdispatcher.cc b/otk/eventdispatcher.cc
index d2e1a96e..a34dd9b4 100644
--- a/otk/eventdispatcher.cc
+++ b/otk/eventdispatcher.cc
@@ -11,7 +11,7 @@
namespace otk {
OtkEventDispatcher::OtkEventDispatcher()
- : _fallback(0)
+ : _fallback(0), _master(0)
{
}
@@ -57,6 +57,9 @@ void OtkEventDispatcher::dispatchEvents(void)
if (handler)
handler->handle(e);
+
+ if (_master)
+ _master->handle(e);
}
}
diff --git a/otk/eventdispatcher.hh b/otk/eventdispatcher.hh
index 28741d95..b56445a4 100644
--- a/otk/eventdispatcher.hh
+++ b/otk/eventdispatcher.hh
@@ -24,9 +24,16 @@ public:
{ _fallback = fallback; }
OtkEventHandler *getFallbackHandler(void) const { return _fallback; }
+ //! Sets an event handler that gets all events for all handlers after
+ //! any specific handlers have received them
+ inline void setMasterHandler(OtkEventHandler *master)
+ { _master = master; }
+ OtkEventHandler *getMasterHandler(void) const { return _master; }
+
private:
OtkEventMap _map;
OtkEventHandler *_fallback;
+ OtkEventHandler *_master;
//! The time at which the last XEvent with a time was received
Time _lasttime; // XXX: store this! also provide an accessor!