mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Revert "sway/tree: Simplify sway_node teardown"
This reverts commit e28e6484e8.
This change tried to remove nodes from all points of reference to allow
immediate destruction. However, it missed things like the children lists
cloned by transaction states of parent nodes.
Adding all that extra cleanup would not be in the spirit of a PR
claiming to simplify teardown. Let's wait for someone to come up with a
cleaner approach instead.
Fixes: https://github.com/swaywm/sway/pull/8738
This commit is contained in:
parent
0cd45d4ad2
commit
56f2db062d
16 changed files with 149 additions and 125 deletions
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
struct sway_transaction_instruction;
|
||||
struct sway_view;
|
||||
struct sway_node;
|
||||
|
||||
/**
|
||||
* Find all dirty containers, create and commit a transaction containing them,
|
||||
|
|
@ -31,11 +30,6 @@ struct sway_node;
|
|||
*/
|
||||
void transaction_commit_dirty(void);
|
||||
|
||||
/**
|
||||
* Remove a node that will be destroyed from transactions and dirty node lists.
|
||||
*/
|
||||
void transaction_remove_node(struct sway_node *node);
|
||||
|
||||
/*
|
||||
* Same as transaction_commit_dirty, but signalling that this is a
|
||||
* client-initiated change has already taken effect.
|
||||
|
|
|
|||
|
|
@ -84,6 +84,8 @@ struct sway_output *output_create(struct wlr_output *wlr_output);
|
|||
|
||||
void output_destroy(struct sway_output *output);
|
||||
|
||||
void output_begin_destroy(struct sway_output *output);
|
||||
|
||||
struct sway_output *output_from_wlr_output(struct wlr_output *output);
|
||||
|
||||
struct sway_output *output_get_in_direction(struct sway_output *reference,
|
||||
|
|
|
|||
|
|
@ -155,6 +155,8 @@ struct sway_container *container_create(struct sway_view *view);
|
|||
|
||||
void container_destroy(struct sway_container *con);
|
||||
|
||||
void container_begin_destroy(struct sway_container *con);
|
||||
|
||||
/**
|
||||
* Search a container's descendants a container based on test criteria. Returns
|
||||
* the first container that passes the test.
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ struct sway_node {
|
|||
|
||||
struct sway_transaction_instruction *instruction;
|
||||
size_t ntxnrefs;
|
||||
bool destroying;
|
||||
|
||||
// If true, indicates that the container has pending state that differs from
|
||||
// the current.
|
||||
|
|
|
|||
|
|
@ -101,6 +101,8 @@ struct sway_view {
|
|||
struct wl_listener foreign_close_request;
|
||||
struct wl_listener foreign_destroy;
|
||||
|
||||
bool destroying;
|
||||
|
||||
list_t *executed_criteria; // struct criteria *
|
||||
|
||||
union {
|
||||
|
|
@ -294,6 +296,8 @@ bool view_init(struct sway_view *view, enum sway_view_type type,
|
|||
|
||||
void view_destroy(struct sway_view *view);
|
||||
|
||||
void view_begin_destroy(struct sway_view *view);
|
||||
|
||||
/**
|
||||
* Map a view, ie. make it visible in the tree.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -62,7 +62,9 @@ struct sway_workspace *workspace_create(struct sway_output *output,
|
|||
|
||||
void workspace_destroy(struct sway_workspace *workspace);
|
||||
|
||||
bool workspace_consider_destroy(struct sway_workspace *ws);
|
||||
void workspace_begin_destroy(struct sway_workspace *workspace);
|
||||
|
||||
void workspace_consider_destroy(struct sway_workspace *ws);
|
||||
|
||||
char *workspace_next_name(const char *output_name);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue