Commit graph

15 commits

Author SHA1 Message Date
Hiroaki Yamamoto
5cc0757390
overlay: add snap-to-edge overlay (PR #1652)
...and unify region overlay and snap-to-edge overlay into overlay.c.

Snap-to-edge overlay is delayed for 500ms to prevent flickering when
the view is dragged from an output to another (demo in discussion labwc#1613).

This also fixes a bug that region overlay is not shown when a modifier
key is re-pressed.
2024-04-05 04:35:31 +02:00
Consolatis
b359b1560c Move keyboard functions into input/keyboard.h 2023-10-30 21:14:04 +00:00
John Lindgren
921c30c1fa regions: perform rounding more carefully
Add percentages (x + width, y + height) before scaling so that there is
no gap between regions due to rounding variations
2023-10-21 20:49:04 +02:00
Consolatis
a4fb5b093b 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
2023-03-07 20:55:35 +00:00
John Lindgren
fe7edf82d9 region: Add output pointer to struct region 2023-02-17 04:47:15 +01:00
John Lindgren
d2fae39fe3 view: Add view_evacuate_region() helper
v2: Modify asserts as suggested by Consolatis
2023-02-17 04:47:15 +01:00
Consolatis
07ee56176d SnapToRegion: Allow for live config updates 2023-01-11 18:52:24 +01:00
Consolatis
eb5c8cfdad SnapToRegion: Add dynamic overlay
Either uses a half transparent single rect if running
hardware accelerated or uses a solid struct multirect
outline if not.
2023-01-11 18:52:24 +01:00
Consolatis
4edd67de17 SnapToRegion: Evacuate tiled views from destroying outputs 2023-01-11 18:52:24 +01:00
Consolatis
7e99d8ba08 SnapToRegion: Add overlay while moving and pressing a modifier 2023-01-11 18:52:24 +01:00
Consolatis
0c31886061 SnapToRegion: Add regions_from_cursor() 2023-01-11 18:52:24 +01:00
Consolatis
96a591297d SnapToRegion: Add SnapToRegion action 2023-01-11 18:52:24 +01:00
Consolatis
67952cd749 SnapToRegion: Wire up output and handle usable_area changes 2023-01-11 18:52:24 +01:00
Consolatis
43fe138385 SnapToRegion: Add config parser 2023-01-11 18:52:23 +01:00
Consolatis
51727cf8f7 SnapToRegion: Add implementation 2023-01-10 23:29:10 +01:00