From 1faa7be4df1726873b4af5ff82ea06404977d065 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Thu, 12 Jul 2007 14:44:34 +0000 Subject: [PATCH] ignore break or repeat when the make code for this key was not visible --- lib/actions/action.cpp | 8 +++++++- lib/actions/action.h | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/actions/action.cpp b/lib/actions/action.cpp index cb9e5e05..0eb4cdb1 100644 --- a/lib/actions/action.cpp +++ b/lib/actions/action.cpp @@ -2,6 +2,7 @@ #include #include #include +#include /* @@ -149,9 +150,14 @@ void eActionMap::keyPressed(const std::string &device, int key, int flags) std::list call_list; /* iterate active contexts. */ - for (std::multimap::const_iterator c(m_bindings.begin()); + for (std::multimap::iterator c(m_bindings.begin()); c != m_bindings.end(); ++c) { + if (flags == eRCKey::flagMake) + c->second.m_prev_seen_make_key = key; + else if (c->second.m_prev_seen_make_key != key) // ignore repeat or break when the make code for this key was not visible + continue; + /* is this a native context? */ if (c->second.m_widget) { diff --git a/lib/actions/action.h b/lib/actions/action.h index f0a6ee49..9628a69a 100644 --- a/lib/actions/action.h +++ b/lib/actions/action.h @@ -43,6 +43,9 @@ private: static eActionMap *instance; struct eActionBinding { + eActionBinding() + :m_prev_seen_make_key(-1) + {} // eActionContext *m_context; std::string m_context; // FIXME std::string m_domain; @@ -51,6 +54,7 @@ private: eWidget *m_widget; int m_id; + int m_prev_seen_make_key; }; std::multimap m_bindings; -- 2.30.2