diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/areapicker/Picker.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/areapicker/Picker.qml b/modules/areapicker/Picker.qml index ad587a8..312c403 100644 --- a/modules/areapicker/Picker.qml +++ b/modules/areapicker/Picker.qml @@ -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) { |