mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
Pass input device and time in key_handler callback
Move the modifiers to a input device getter function.
This commit is contained in:
parent
5029a13283
commit
67cac8a565
5 changed files with 28 additions and 10 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue