mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
src/keyboard.c: Make any_modifier_pressed() global
This commit is contained in:
parent
d309df6f87
commit
a0d1003f28
2 changed files with 4 additions and 3 deletions
|
|
@ -522,6 +522,7 @@ void cursor_init(struct seat *seat);
|
||||||
void cursor_finish(struct seat *seat);
|
void cursor_finish(struct seat *seat);
|
||||||
|
|
||||||
void keyboard_init(struct seat *seat);
|
void keyboard_init(struct seat *seat);
|
||||||
|
bool keyboard_any_modifiers_pressed(struct wlr_keyboard *keyboard);
|
||||||
void keyboard_finish(struct seat *seat);
|
void keyboard_finish(struct seat *seat);
|
||||||
|
|
||||||
void touch_init(struct seat *seat);
|
void touch_init(struct seat *seat);
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ change_vt(struct server *server, unsigned int vt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
bool
|
||||||
any_modifiers_pressed(struct wlr_keyboard *keyboard)
|
keyboard_any_modifiers_pressed(struct wlr_keyboard *keyboard)
|
||||||
{
|
{
|
||||||
xkb_mod_index_t i;
|
xkb_mod_index_t i;
|
||||||
for (i = 0; i < xkb_keymap_num_mods(keyboard->keymap); i++) {
|
for (i = 0; i < xkb_keymap_num_mods(keyboard->keymap); i++) {
|
||||||
|
|
@ -42,7 +42,7 @@ keyboard_modifiers_notify(struct wl_listener *listener, void *data)
|
||||||
struct wlr_keyboard_key_event *event = data;
|
struct wlr_keyboard_key_event *event = data;
|
||||||
struct wlr_keyboard *keyboard = &seat->keyboard_group->keyboard;
|
struct wlr_keyboard *keyboard = &seat->keyboard_group->keyboard;
|
||||||
if (event->state == WL_KEYBOARD_KEY_STATE_RELEASED
|
if (event->state == WL_KEYBOARD_KEY_STATE_RELEASED
|
||||||
&& !any_modifiers_pressed(keyboard)) {
|
&& !keyboard_any_modifiers_pressed(keyboard)) {
|
||||||
/* end cycle */
|
/* end cycle */
|
||||||
desktop_focus_and_activate_view(&server->seat,
|
desktop_focus_and_activate_view(&server->seat,
|
||||||
server->cycle_view);
|
server->cycle_view);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue