mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -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
15
src/cursor.c
15
src/cursor.c
|
|
@ -190,17 +190,14 @@ process_cursor_move(struct server *server, uint32_t time)
|
|||
view_move(view, dx, dy);
|
||||
|
||||
/* Region overlay */
|
||||
if (!regions_available()) {
|
||||
if (!regions_should_snap(server)) {
|
||||
return;
|
||||
}
|
||||
struct wlr_keyboard *keyboard = &server->seat.keyboard_group->keyboard;
|
||||
if (keyboard_any_modifiers_pressed(keyboard)) {
|
||||
struct region *region = regions_from_cursor(server);
|
||||
if (region) {
|
||||
regions_show_overlay(view, &server->seat, region);
|
||||
} else {
|
||||
regions_hide_overlay(&server->seat);
|
||||
}
|
||||
struct region *region = regions_from_cursor(server);
|
||||
if (region) {
|
||||
regions_show_overlay(view, &server->seat, region);
|
||||
} else {
|
||||
regions_hide_overlay(&server->seat);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue