Fix window chrome positioning on Sway
Improves focused-window geometry so chrome placement stays stable across workspaces and floating containers. WindowService now exposes focused workspace X/Y, resolves workspace by name, and publishes those offsets with focused geometry. The Sway backend now tracks the active floating frame through recursion and consistently derives frame/deco/content rects from that frame. QML chrome placement was updated to use workspace-relative coordinates and simpler direct margins (removing interpolation behaviors), with safer title-bar height handling for vertical centering.
This commit is contained in:
@@ -82,3 +82,14 @@ const WorkspaceInfo *WorkspaceModel::focusedWorkspace() const
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const WorkspaceInfo *WorkspaceModel::workspaceByName(const QString &name) const
|
||||
{
|
||||
if (name.isEmpty())
|
||||
return nullptr;
|
||||
for (const WorkspaceInfo &workspace : m_workspaces) {
|
||||
if (workspace.name == name)
|
||||
return &workspace;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user