From d374e8415f7ac4c8a44120d8df624db7027ba63f Mon Sep 17 00:00:00 2001 From: Sunderland93 Date: Thu, 3 Jan 2019 22:54:01 +0400 Subject: [PATCH] Fix drag with "Alt" key on non xdg_wm_base shell's --- gfx/drivers_context/wayland_ctx.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 4037cc349e..1f7bc4af63 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -327,14 +327,17 @@ static void pointer_handle_button(void *data, { wl->input.mouse.left = true; - if (BIT_GET(wl->input.key_state, KEY_LEFTALT) && wl->xdg_toplevel) { - if (wl->xdg_toplevel) - xdg_toplevel_move(wl->xdg_toplevel, wl->seat, serial); - else if (wl->zxdg_toplevel) - zxdg_toplevel_v6_move(wl->zxdg_toplevel, wl->seat, serial); - else if (wl->shell) - wl_shell_surface_move(wl->shell_surf, wl->seat, serial); + if (BIT_GET(wl->input.key_state, KEY_LEFTALT)) { + if (wl->xdg_toplevel) { + xdg_toplevel_move(wl->xdg_toplevel, wl->seat, serial); } + else if (wl->zxdg_toplevel) { + zxdg_toplevel_v6_move(wl->zxdg_toplevel, wl->seat, serial); + } + else if (wl->shell) { + wl_shell_surface_move(wl->shell_surf, wl->seat, serial); + } + } } else if (button == BTN_RIGHT) wl->input.mouse.right = true;