summaryrefslogtreecommitdiff
path: root/clients/terminal.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-01-19 14:20:33 -0500
committerKristian Høgsberg <krh@bitplanet.net>2011-01-19 14:25:13 -0500
commit67cac8a565c3e03567372666c7e83796c6a23114 (patch)
treee9a10544657823b07d8fc06fd52d15f691ec814d /clients/terminal.c
parent5029a13283d5b9d4ec25302a9c3841e426dcb3c0 (diff)
Pass input device and time in key_handler callback
Move the modifiers to a input device getter function.
Diffstat (limited to 'clients/terminal.c')
-rw-r--r--clients/terminal.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/clients/terminal.c b/clients/terminal.c
index d3d7a0b..a89a5bf 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -1872,13 +1872,21 @@ terminal_data(struct terminal *terminal, const char *data, size_t length)
}
static void
-key_handler(struct window *window, uint32_t key, uint32_t sym,
- uint32_t state, uint32_t modifiers, void *data)
+static void
+key_handler(struct window *window, struct input *input, uint32_t time,
+ uint32_t key, uint32_t sym, uint32_t state, void *data)
{
struct terminal *terminal = data;
char ch[MAX_RESPONSE];
+ uint32_t modifiers;
int len = 0;
+ modifiers = input_get_modifiers(input);
+ if ((modifiers & WINDOW_MODIFIER_CONTROL) &&
+ (modifiers & WINDOW_MODIFIER_SHIFT) &&
+ state && handle_bound_key(terminal, input, sym, 0))
+ return;
+
switch (sym) {
case XK_F11:
if (!state)