mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2026-04-10 06:11:54 +10:00
hyprland/ipc: add null checks and ws preinit to toplevel object init
Previously HyprlandToplevel::updateFromObject did not call findWorkspaceByName with createIfMissing=true, leaving bWorkspace null for a later insertToplevel call from HyprlandIpc::refreshToplevels.
This commit is contained in:
parent
365bf16b1e
commit
1bd5b083cb
3 changed files with 5 additions and 8 deletions
|
|
@ -48,6 +48,7 @@ set shell id.
|
|||
- Fixed volumes not initializing if a pipewire device was already loaded before its node.
|
||||
- Fixed hyprland active toplevel not resetting after window closes.
|
||||
- Fixed hyprland ipc window names and titles being reversed.
|
||||
- Fixed a hyprland ipc crash when refreshing toplevels before workspaces.
|
||||
- Fixed missing signals for system tray item title and description updates.
|
||||
- Fixed asynchronous loaders not working after reload.
|
||||
- Fixed asynchronous loaders not working before window creation.
|
||||
|
|
|
|||
|
|
@ -729,7 +729,7 @@ void HyprlandIpc::refreshToplevels() {
|
|||
}
|
||||
|
||||
auto* workspace = toplevel->bindableWorkspace().value();
|
||||
workspace->insertToplevel(toplevel);
|
||||
if (workspace) workspace->insertToplevel(toplevel);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,20 +72,16 @@ void HyprlandToplevel::updateFromObject(const QVariantMap& object) {
|
|||
Qt::beginPropertyUpdateGroup();
|
||||
bool ok = false;
|
||||
auto address = addressStr.toULongLong(&ok, 16);
|
||||
if (!ok || !address) {
|
||||
return;
|
||||
}
|
||||
if (ok && address) this->setAddress(address);
|
||||
|
||||
this->setAddress(address);
|
||||
this->bTitle = title;
|
||||
|
||||
auto workspaceMap = object.value("workspace").toMap();
|
||||
auto workspaceName = workspaceMap.value("name").toString();
|
||||
|
||||
auto* workspace = this->ipc->findWorkspaceByName(workspaceName, false);
|
||||
if (!workspace) return;
|
||||
auto* workspace = this->ipc->findWorkspaceByName(workspaceName, true);
|
||||
if (workspace) this->setWorkspace(workspace);
|
||||
|
||||
this->setWorkspace(workspace);
|
||||
this->bLastIpcObject = object;
|
||||
Qt::endPropertyUpdateGroup();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue