feat: emit dispatcher when any window is created during update
This commit is contained in:
parent
e845db84ad
commit
846842be80
|
@ -194,6 +194,7 @@ auto Workspaces::update() -> void {
|
||||||
workspace->update(format_, workspace_icon);
|
workspace->update(format_, workspace_icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool any_window_created = false;
|
||||||
std::vector<CreateWindow> not_created;
|
std::vector<CreateWindow> not_created;
|
||||||
|
|
||||||
for (auto &window_payload : windows_to_create_) {
|
for (auto &window_payload : windows_to_create_) {
|
||||||
|
@ -201,6 +202,7 @@ auto Workspaces::update() -> void {
|
||||||
for (auto &workspace : workspaces_) {
|
for (auto &workspace : workspaces_) {
|
||||||
if (workspace->on_window_opened(window_payload)) {
|
if (workspace->on_window_opened(window_payload)) {
|
||||||
created = true;
|
created = true;
|
||||||
|
any_window_created = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,6 +214,10 @@ auto Workspaces::update() -> void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (any_window_created) {
|
||||||
|
dp.emit();
|
||||||
|
}
|
||||||
|
|
||||||
windows_to_create_.clear();
|
windows_to_create_.clear();
|
||||||
windows_to_create_ = not_created;
|
windows_to_create_ = not_created;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue