mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Prevent cursor based region-snapping when starting a move with A-Left
When wanting to snap to a region when starting the move operation with A-Left (or a similar mousebind which includes a modifier), the modifier - or another one - must be pressed again. Fixes #761
This commit is contained in:
parent
a0b5a80ce1
commit
a4fb5b093b
6 changed files with 40 additions and 28 deletions
|
|
@ -17,9 +17,16 @@
|
|||
#include "view.h"
|
||||
|
||||
bool
|
||||
regions_available(void)
|
||||
regions_should_snap(struct server *server)
|
||||
{
|
||||
return !wl_list_empty(&rc.regions);
|
||||
if (server->input_mode != LAB_INPUT_STATE_MOVE
|
||||
|| wl_list_empty(&rc.regions)
|
||||
|| server->seat.region_prevent_snap) {
|
||||
return false;
|
||||
}
|
||||
|
||||
struct wlr_keyboard *keyboard = &server->seat.keyboard_group->keyboard;
|
||||
return keyboard_any_modifiers_pressed(keyboard);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue