mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2026-02-23 03:33:57 +11:00
i3/ipc: fix workspace and monitor focus being unset on launch
This commit is contained in:
parent
2028766e61
commit
14aa1793df
5 changed files with 26 additions and 9 deletions
|
|
@ -43,17 +43,18 @@ void I3Monitor::updateFromObject(const QVariantMap& obj) {
|
|||
if (!this->bActiveWorkspace
|
||||
|| activeWorkspaceName != this->bActiveWorkspace->bindableName().value())
|
||||
{
|
||||
auto* workspace = this->ipc->findWorkspaceByName(activeWorkspaceName);
|
||||
if (activeWorkspaceName.isEmpty() || workspace == nullptr) { // is null when output is disabled
|
||||
if (activeWorkspaceName.isEmpty()) {
|
||||
this->bActiveWorkspace = nullptr;
|
||||
} else {
|
||||
this->bActiveWorkspace = workspace;
|
||||
this->bActiveWorkspace = this->ipc->findWorkspaceByName(activeWorkspaceName);
|
||||
}
|
||||
};
|
||||
|
||||
Qt::endPropertyUpdateGroup();
|
||||
}
|
||||
|
||||
void I3Monitor::updateInitial(const QString& name) { this->bName = name; }
|
||||
|
||||
void I3Monitor::setFocusedWorkspace(I3Workspace* workspace) { this->bActiveWorkspace = workspace; };
|
||||
|
||||
} // namespace qs::i3::ipc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue