forked from quickshell/quickshell
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
|
|
@ -44,11 +44,10 @@ void I3Workspace::updateFromObject(const QVariantMap& obj) {
|
|||
auto monitorName = obj.value("output").value<QString>();
|
||||
|
||||
if (!this->bMonitor || monitorName != this->bMonitor->bindableName().value()) {
|
||||
auto* monitor = this->ipc->findMonitorByName(monitorName);
|
||||
if (monitorName.isEmpty() || monitor == nullptr) { // is null when output is disabled
|
||||
if (monitorName.isEmpty()) {
|
||||
this->bMonitor = nullptr;
|
||||
} else {
|
||||
this->bMonitor = monitor;
|
||||
this->bMonitor = this->ipc->findMonitorByName(monitorName, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue