Commit graph

13 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
Tomi Ollila
7ad5200f2e includes: identifier consistency in include guards
Made all header files to have LABWC_ prefix in include guard identifers.

Converted from __LABWC_ in 35 include/ files.
Converted from __LAB_ in 5 include/ files.
Added LABWC prefix to 3 include/ files.
Added include guards to 3 include/ files.

The double underscores were removed since according to C standard
those "are always reserved for any use".
2023-05-13 22:29:21 +01: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
e0388ba8bf region: Add #include to make header dependency explicit 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
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