cycle: use dummy node to remember the scene position of previewed window

With this approach, we only need to store cycle->dummy_node instead of
cycle->preview_anchor and cycle->preview_parent and we don't need to care
about annoying cases like when the previewed window has no siblings or
when a window tracked by cycle->preview_anchor is destroyed.
This commit is contained in:
tokyo4j 2025-11-30 20:05:42 +09:00 committed by Hiroaki Yamamoto
parent c1f3286cfe
commit 2b28c41b23
2 changed files with 14 additions and 36 deletions

View file

@ -306,8 +306,7 @@ struct server {
bool preview_was_shaded;
bool preview_was_enabled;
struct wlr_scene_node *preview_node;
struct wlr_scene_tree *preview_parent;
struct wlr_scene_node *preview_anchor;
struct wlr_scene_node *preview_dummy;
struct lab_scene_rect *preview_outline;
} cycle;