mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
Merge pull request #1731 from acrisci/ipc-window-events
ipc window and workspace events
This commit is contained in:
commit
3852a710ca
1 changed files with 7 additions and 0 deletions
|
@ -51,10 +51,16 @@ const char *container_type_to_str(enum sway_container_type type) {
|
|||
}
|
||||
|
||||
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);
|
||||
ipc_event_window(container, "new");
|
||||
}
|
||||
|
||||
static void container_close_notify(struct sway_container *container) {
|
||||
// TODO send ipc event type based on the container type
|
||||
ipc_event_window(container, "close");
|
||||
}
|
||||
|
||||
struct sway_container *container_create(enum sway_container_type type) {
|
||||
// next id starts at 1 because 0 is assigned to root_container in layout.c
|
||||
static size_t next_id = 1;
|
||||
|
@ -82,6 +88,7 @@ static void _container_destroy(struct sway_container *cont) {
|
|||
}
|
||||
|
||||
wl_signal_emit(&cont->events.destroy, cont);
|
||||
container_close_notify(cont);
|
||||
|
||||
struct sway_container *parent = cont->parent;
|
||||
if (cont->children != NULL && cont->children->length) {
|
||||
|
|
Loading…
Reference in a new issue