summaryrefslogtreecommitdiff
path: root/unity-shared
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2015-10-27 18:35:44 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2015-10-27 18:35:44 +0100
commit30883ee0910615d65203aed765302f77388382f7 (patch)
treec543a182ad0c21d97b07bbca73b43b4208ea3975 /unity-shared
parent87330e1cb758a7d2be021ac8cdf7f6ad91633d28 (diff)
GnomeKeyGrabber: get events timestamp using CompOption::getIntOptionNamed time
(bzr r4027.2.6)
Diffstat (limited to 'unity-shared')
-rw-r--r--unity-shared/GnomeKeyGrabber.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/unity-shared/GnomeKeyGrabber.cpp b/unity-shared/GnomeKeyGrabber.cpp
index 88d49871a..603daa2af 100644
--- a/unity-shared/GnomeKeyGrabber.cpp
+++ b/unity-shared/GnomeKeyGrabber.cpp
@@ -64,11 +64,6 @@ namespace testing
std::string const DBUS_NAME = "com.canonical.Unity.Test.GnomeKeyGrabber";
}
-namespace
-{
-inline int compiz_event_timestamp(CompOption::Vector& options) { return options[7].value().i(); }
-}
-
GnomeGrabber::Impl::Impl(bool test_mode)
: screen_(screen)
, shell_server_(test_mode ? testing::DBUS_NAME : shell::DBUS_NAME)
@@ -224,7 +219,7 @@ uint32_t GnomeGrabber::Impl::GrabDBusAccelerator(std::string const& owner, std::
action.setState(CompAction::StateInitKey);
action.setInitiate([this, action_id](CompAction* action, CompAction::State state, CompOption::Vector& options) {
LOG_DEBUG(logger) << "pressed \"" << action->keyToString() << "\"";
- ActivateDBusAction(*action, action_id, 0, compiz_event_timestamp(options));
+ ActivateDBusAction(*action, action_id, 0, CompOption::getIntOptionNamed(options, "time"));
return true;
});
}
@@ -239,7 +234,7 @@ uint32_t GnomeGrabber::Impl::GrabDBusAccelerator(std::string const& owner, std::
if (state & CompAction::StateTermTapped)
{
LOG_DEBUG(logger) << "tapped \"" << key << "\"";
- ActivateDBusAction(*action, action_id, 0, compiz_event_timestamp(options));
+ ActivateDBusAction(*action, action_id, 0, CompOption::getIntOptionNamed(options, "time"));
return true;
}