hyprland/ipc: track workspace fullscreen state

This commit is contained in:
outfoxxed 2025-05-19 00:01:04 -07:00
parent edfc4c681c
commit 2e33ef5b7f
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
3 changed files with 16 additions and 0 deletions

View file

@ -381,6 +381,15 @@ void HyprlandIpc::onEvent(HyprlandIpcEvent* event) {
<< (*workspaceIter)->bindableName().value() << "to" << name;
(*workspaceIter)->bindableName().setValue(name);
} else if (event->name == "fullscreen") {
if (auto* workspace = this->bFocusedWorkspace.value()) {
workspace->bindableHasFullscreen().setValue(event->data == "1");
}
// In theory knowing the current workspace would be enough to determine where
// the fullscreen state changed, but this falls apart if you move a fullscreen
// window between workspaces.
this->refreshWorkspaces(false);
}
}