picker: fix client highlighting
This commit is contained in:
parent
c5381c5194
commit
5405400bd1
1 changed files with 3 additions and 1 deletions
|
|
@ -47,10 +47,12 @@ MouseArea {
|
||||||
|
|
||||||
function checkClientRects(x: real, y: real): void {
|
function checkClientRects(x: real, y: real): void {
|
||||||
for (const client of clients) {
|
for (const client of clients) {
|
||||||
const {
|
let {
|
||||||
at: [cx, cy],
|
at: [cx, cy],
|
||||||
size: [cw, ch]
|
size: [cw, ch]
|
||||||
} = client.lastIpcObject;
|
} = client.lastIpcObject;
|
||||||
|
cx -= screen.x;
|
||||||
|
cy -= screen.y;
|
||||||
if (cx <= x && cy <= y && cx + cw >= x && cy + ch >= y) {
|
if (cx <= x && cy <= y && cx + cw >= x && cy + ch >= y) {
|
||||||
onClient = true;
|
onClient = true;
|
||||||
sx = cx;
|
sx = cx;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue