diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-27 21:50:00 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-27 21:50:00 +1000 |
| commit | 8689ea423ad3601b8defaa37742219b414e32f99 (patch) | |
| tree | f42dae8ac241837f1d9194089e77833e3ddb7561 /modules | |
| parent | internal: windowinfo pass in client (diff) | |
| download | caelestia-shell-8689ea423ad3601b8defaa37742219b414e32f99.tar.gz caelestia-shell-8689ea423ad3601b8defaa37742219b414e32f99.tar.bz2 caelestia-shell-8689ea423ad3601b8defaa37742219b414e32f99.zip | |
picker: fix client selecting
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/areapicker/Picker.qml | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/areapicker/Picker.qml b/modules/areapicker/Picker.qml index f3a7eb0..ad587a8 100644 --- a/modules/areapicker/Picker.qml +++ b/modules/areapicker/Picker.qml @@ -39,13 +39,17 @@ MouseArea { property list<var> clients: Hyprland.toplevels.values.filter(c => c.workspace.id === Hyprland.activeWsId) function checkClientRects(x: real, y: real): void { - for (const c of clients) { - if (c.x <= x && c.y <= y && c.x + c.width >= x && c.y + c.height >= y) { + for (const client of clients) { + const { + at: [cx, cy], + size: [cw, ch] + } = client.lastIpcObject; + if (cx <= x && cy <= y && cx + cw >= x && cy + ch >= y) { onClient = true; - sx = c.x; - sy = c.y; - ex = c.x + c.width; - ey = c.y + c.height; + sx = cx; + sy = cy; + ex = cx + cw; + ey = cy + ch; break; } } |