[fixup] remove overlay.pending and add overlay.active.output

This commit is contained in:
tokyo4j 2024-03-24 22:24:40 +09:00
parent 5b1a03ae69
commit 93bc17a99a
7 changed files with 50 additions and 48 deletions

View file

@ -160,7 +160,6 @@ struct seat {
struct wlr_scene_tree *icons;
} drag;
/* Private use by overlay.c */
struct overlay overlay;
/* Used to prevent region snapping when starting a move with A-Left */
bool region_prevent_snap;

View file

@ -14,23 +14,23 @@ struct overlay {
struct multi_rect *pixman_rect;
};
/* For caching previously shown overlay */
/* Represents currently shown or delayed overlay */
struct {
/* Region overlay */
struct region *region;
/* Snap-to-edge overlay */
enum view_edge edge;
struct output *output;
} active;
/* For delayed snap-to-edge overlay */
struct wl_event_source *timer;
struct {
struct view *view;
struct wlr_box box;
} pending;
};
/* Calls overlay_hide() internally if the view is not to be snapped */
void overlay_show(struct seat *seat, struct view *view);
/* This function must be called when grabbed view is destroyed */
/* Calls overlay_hide() internally if there's no overlay to show */
void overlay_show(struct seat *seat);
/* This function must be called when server->grabbed_view is destroyed */
void overlay_hide(struct seat *seat);
#endif