aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
authorokan2013-05-23 16:52:39 +0000
committerokan2013-05-23 16:52:39 +0000
commit0e1a282d21c537a3a9f065464a15044befb6f4d1 (patch)
tree800f1952cd32945dea37108928df92ad489a7ab1 /xevents.c
parent5a8fdbc2af0bc6cb55cda04a3dc9ef09bbb40090 (diff)
downloadcwm-0e1a282d21c537a3a9f065464a15044befb6f4d1.tar.gz
alter conf_grab(_kbd) to first ungrab AnyKey/AnyModifier, then proceed
to grab keys in keybindingq. we don't need to ungrab/grab on every addition to the queue, just once with a complete keybindingq; simplify grabbing keys per screen (during init) and during a MappingNotify. while here, change conf_grab_{kbd,mouse} to require only a Window.
Diffstat (limited to '')
-rw-r--r--xevents.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/xevents.c b/xevents.c
index 65d7628..e9d819e 100644
--- a/xevents.c
+++ b/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xevents.c,v 1.82 2013/05/21 00:29:20 okan Exp $
+ * $OpenBSD: xevents.c,v 1.83 2013/05/23 16:52:39 okan Exp $
*/
/*
@@ -389,15 +389,13 @@ static void
xev_handle_mappingnotify(XEvent *ee)
{
XMappingEvent *e = &ee->xmapping;
- struct keybinding *kb;
-
- TAILQ_FOREACH(kb, &Conf.keybindingq, entry)
- conf_ungrab(&Conf, kb);
+ struct screen_ctx *sc;
XRefreshKeyboardMapping(e);
-
- TAILQ_FOREACH(kb, &Conf.keybindingq, entry)
- conf_grab(&Conf, kb);
+ if (e->request == MappingKeyboard) {
+ TAILQ_FOREACH(sc, &Screenq, entry)
+ conf_grab_kbd(sc->rootwin);
+ }
}
static void