mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-06 01:41:03 -05:00
Properly track mapping and unmapping
We shouldn't render a window before it is mapped (obviously), but we render all windows in the view list. Hence, only insert the window once it is mapped. We could run into the case where a window is destroyed without being in the window list, so we now track unmapping again and remove windows from the list when they get unmapped.
This commit is contained in:
parent
a9818c0df1
commit
786e28bdac
3 changed files with 19 additions and 6 deletions
2
view.h
2
view.h
|
|
@ -25,6 +25,7 @@ struct cg_view {
|
|||
};
|
||||
|
||||
struct wl_listener destroy;
|
||||
struct wl_listener unmap;
|
||||
struct wl_listener map;
|
||||
// TODO: allow applications to go to fullscreen from maximized?
|
||||
// struct wl_listener request_fullscreen;
|
||||
|
|
@ -39,6 +40,7 @@ void view_activate(struct cg_view *view, bool activate);
|
|||
void view_maximize(struct cg_view *view);
|
||||
void view_center(struct cg_view *view);
|
||||
bool view_is_primary(struct cg_view *view);
|
||||
void view_unmap(struct cg_view *view);
|
||||
void view_map(struct cg_view *view, struct wlr_surface *surface);
|
||||
void view_destroy(struct cg_view *view);
|
||||
struct cg_view *cg_view_create(struct cg_server *server);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue