picker: sort client rects
Pinned > floating > others
This commit is contained in:
parent
4aa4e8eaf9
commit
8ba5c83f7b
1 changed files with 8 additions and 1 deletions
|
|
@ -36,7 +36,14 @@ MouseArea {
|
|||
property real sw: Math.abs(sx - ex)
|
||||
property real sh: Math.abs(sy - ey)
|
||||
|
||||
property list<var> clients: Hyprland.toplevels.values.filter(c => c.workspace.id === Hyprland.activeWsId)
|
||||
property list<var> clients: Hyprland.toplevels.values.filter(c => c.workspace.id === Hyprland.activeWsId).sort((a, b) => {
|
||||
// Pinned first, then floating, then any other
|
||||
if (a.lastIpcObject.pinned === b.lastIpcObject.pinned)
|
||||
return a.lastIpcObject.floating === b.lastIpcObject.floating ? 0 : a.lastIpcObject.floating ? -1 : 1;
|
||||
if (a.lastIpcObject.pinned)
|
||||
return -1;
|
||||
return 1;
|
||||
})
|
||||
|
||||
function checkClientRects(x: real, y: real): void {
|
||||
for (const client of clients) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue