mirror of
https://github.com/labwc/labwc.git
synced 2026-04-02 07:15:43 -04:00
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.
This commit is contained in:
parent
67669dcf1e
commit
5cc0757390
16 changed files with 361 additions and 152 deletions
|
|
@ -25,14 +25,6 @@ struct region {
|
|||
} center;
|
||||
};
|
||||
|
||||
struct region_overlay {
|
||||
struct wlr_scene_tree *tree;
|
||||
union {
|
||||
struct wlr_scene_rect *overlay;
|
||||
struct multi_rect *pixman_overlay;
|
||||
};
|
||||
};
|
||||
|
||||
/* Returns true if we should show the region overlay or snap to region */
|
||||
bool regions_should_snap(struct server *server);
|
||||
|
||||
|
|
@ -73,7 +65,4 @@ void regions_destroy(struct seat *seat, struct wl_list *regions);
|
|||
struct region *regions_from_cursor(struct server *server);
|
||||
struct region *regions_from_name(const char *region_name, struct output *output);
|
||||
|
||||
void regions_show_overlay(struct view *view, struct seat *seat, struct region *region);
|
||||
void regions_hide_overlay(struct seat *seat);
|
||||
|
||||
#endif /* LABWC_REGIONS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue