mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
Fully support multiple primary clients
This is the path we settled on in #24. That is: any new toplevel window takes over the Cage display, hiding any previous toplevels until it is closed. Only when the last toplevel is closed, does Cage exit as well.
This commit is contained in:
parent
b0bd4e680d
commit
b6024e982f
4 changed files with 8 additions and 18 deletions
4
view.c
4
view.c
|
|
@ -112,17 +112,17 @@ void
|
|||
view_destroy(struct cg_view *view)
|
||||
{
|
||||
struct cg_server *server = view->server;
|
||||
bool terminate = view_is_primary(view);
|
||||
|
||||
if (view->wlr_surface != NULL) {
|
||||
view_unmap(view);
|
||||
}
|
||||
free(view);
|
||||
|
||||
/* If this was our primary view, exit. Otherwise, focus the
|
||||
/* If this was our last primary view, exit. Otherwise, focus the
|
||||
previous (i.e., next highest in the stack) view. Since
|
||||
we're still here, we know there is at least one view in the
|
||||
list. */
|
||||
bool terminate = wl_list_empty(&server->views);
|
||||
if (terminate) {
|
||||
wl_display_terminate(server->wl_display);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue