mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
[fixup] cache previous state & some refactoring
This commit is contained in:
parent
0b2d58ffc5
commit
5b1a03ae69
3 changed files with 96 additions and 66 deletions
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <wlr/util/box.h>
|
||||
#include "common/graphic-helpers.h"
|
||||
#include "regions.h"
|
||||
#include "view.h"
|
||||
|
||||
struct overlay {
|
||||
struct wlr_scene_tree *tree;
|
||||
|
|
@ -12,14 +14,23 @@ struct overlay {
|
|||
struct multi_rect *pixman_rect;
|
||||
};
|
||||
|
||||
/* For delayed overlay */
|
||||
struct view *view;
|
||||
struct wlr_box box;
|
||||
/* For caching previously shown overlay */
|
||||
struct {
|
||||
struct region *region;
|
||||
enum view_edge edge;
|
||||
} 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 */
|
||||
void overlay_hide(struct seat *seat);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue