mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 14:34:07 +01:00
Merge pull request #2518 from ianyfan/ipc
Emit window close event earlier, before destroying
This commit is contained in:
commit
d6a5dfc913
@ -42,14 +42,12 @@ const char *container_type_to_str(enum sway_container_type type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void container_create_notify(struct sway_container *container) {
|
void container_create_notify(struct sway_container *container) {
|
||||||
// TODO send ipc event type based on the container type
|
|
||||||
wl_signal_emit(&root_container.sway_root->events.new_container, container);
|
|
||||||
|
|
||||||
if (container->type == C_VIEW) {
|
if (container->type == C_VIEW) {
|
||||||
ipc_event_window(container, "new");
|
ipc_event_window(container, "new");
|
||||||
} else if (container->type == C_WORKSPACE) {
|
} else if (container->type == C_WORKSPACE) {
|
||||||
ipc_event_workspace(NULL, container, "init");
|
ipc_event_workspace(NULL, container, "init");
|
||||||
}
|
}
|
||||||
|
wl_signal_emit(&root_container.sway_root->events.new_container, container);
|
||||||
}
|
}
|
||||||
|
|
||||||
void container_update_textures_recursive(struct sway_container *con) {
|
void container_update_textures_recursive(struct sway_container *con) {
|
||||||
@ -146,10 +144,10 @@ void container_begin_destroy(struct sway_container *con) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_signal_emit(&con->events.destroy, con);
|
|
||||||
if (con->type == C_VIEW) {
|
if (con->type == C_VIEW) {
|
||||||
ipc_event_window(con, "close");
|
ipc_event_window(con, "close");
|
||||||
}
|
}
|
||||||
|
wl_signal_emit(&con->events.destroy, con);
|
||||||
|
|
||||||
container_end_mouse_operation(con);
|
container_end_mouse_operation(con);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user