mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
rootston: add meta-key to config file
This commit is contained in:
parent
9b88f25208
commit
f9dbc1841d
4 changed files with 50 additions and 20 deletions
|
|
@ -166,12 +166,17 @@ static void handle_cursor_axis(struct wl_listener *listener, void *data) {
|
|||
event->orientation, event->delta);
|
||||
}
|
||||
|
||||
static bool is_logo_pressed(struct roots_input *input) {
|
||||
static bool is_meta_pressed(struct roots_input *input) {
|
||||
uint32_t meta_key = input->server->config->keyboard.meta_key;
|
||||
if (meta_key == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
struct roots_keyboard *keyboard;
|
||||
wl_list_for_each(keyboard, &input->keyboards, link) {
|
||||
uint32_t modifiers =
|
||||
wlr_keyboard_get_modifiers(keyboard->device->keyboard);
|
||||
if ((modifiers ^ WLR_MODIFIER_LOGO) == 0) {
|
||||
if ((modifiers ^ meta_key) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -187,7 +192,7 @@ static void do_cursor_button_press(struct roots_input *input,
|
|||
struct roots_view *view = view_at(desktop,
|
||||
input->cursor->x, input->cursor->y, &surface, &sx, &sy);
|
||||
|
||||
if (state == WLR_BUTTON_PRESSED && view && is_logo_pressed(input)) {
|
||||
if (state == WLR_BUTTON_PRESSED && view && is_meta_pressed(input)) {
|
||||
set_view_focus(input, desktop, view);
|
||||
|
||||
switch (button) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue