Since #228 made the pet window focusable, I can't drag the pet anywhere near the top of the screen on KDE Plasma. It stops a few hundred pixels below the top, like there's an invisible wall. Same on a second laptop with a fresh install of the AUR package, so it isn't specific to my setup.
The pet window is 340x420 and the pet sits in the bottom part of it, with the space above kept free for bubbles. Before #228 the window wasn't managed by KWin, so you could drag it partly above the screen edge (the empty bubble area just went off-screen) and the pet could sit right under the panel. Now KWin manages the window and won't let a move requested by the app put it over the panel or above the screen, so the top of the window stops at the panel. On my setup (32 px top panel, pet scale 0.5) that leaves the pet unable to get above roughly y=292.
It isn't the drag code: the drag handler calls setBounds with no clamp, and moving the window through KWin itself (kdotool windowmove to y=0) works fine. It's KWin constraining app-requested moves on a managed window.
I checked with a small standalone Electron script: two frameless windows, one focusable: false (like the pet before #228) and one focusable: true (like now), both moved with setBounds:
| Window |
Requested |
Actual |
focusable: false |
y=0 |
y=0 |
focusable: true |
y=0 |
y=32 |
focusable: false |
y=-150 |
y=-150 |
focusable: true |
y=-150 |
y=32 |
Wandering was already kept inside the work area by clampToVisibleWorkArea (with multi-monitor roaming off, the default), so this only affects dragging.
Reproduce
- KDE Plasma (Wayland session, OpenPets on XWayland with the default
--ozone-platform=x11).
- Drag the pet toward the top of the screen.
- It stops with the invisible top of its window at the top of the work area (the bottom of a top panel, or the screen edge), leaving the pet a few hundred pixels lower.
I'm not sure what the best fix is. A few options I thought of: only make the window focusable while the chat input is open, a window type or hint that KWin doesn't constrain (keeping the #234 skip atoms), or clamping to the visible pet instead of the whole window. Happy to test anything.
Environment: CachyOS, kernel 7.2.7-1-cachyos, KDE Plasma 6.7.5 / KWin 6.7.5 (Wayland session). Laptop 1: main f24f934 (4.0.0 + #236), 100% scaling, 32 px top panel. Laptop 2: fresh openpets-bin 4.0.0-1 from the AUR, 115% scaling.
Since #228 made the pet window focusable, I can't drag the pet anywhere near the top of the screen on KDE Plasma. It stops a few hundred pixels below the top, like there's an invisible wall. Same on a second laptop with a fresh install of the AUR package, so it isn't specific to my setup.
The pet window is 340x420 and the pet sits in the bottom part of it, with the space above kept free for bubbles. Before #228 the window wasn't managed by KWin, so you could drag it partly above the screen edge (the empty bubble area just went off-screen) and the pet could sit right under the panel. Now KWin manages the window and won't let a move requested by the app put it over the panel or above the screen, so the top of the window stops at the panel. On my setup (32 px top panel, pet scale 0.5) that leaves the pet unable to get above roughly y=292.
It isn't the drag code: the drag handler calls
setBoundswith no clamp, and moving the window through KWin itself (kdotool windowmoveto y=0) works fine. It's KWin constraining app-requested moves on a managed window.I checked with a small standalone Electron script: two frameless windows, one
focusable: false(like the pet before #228) and onefocusable: true(like now), both moved withsetBounds:focusable: falsefocusable: truefocusable: falsefocusable: trueWandering was already kept inside the work area by
clampToVisibleWorkArea(with multi-monitor roaming off, the default), so this only affects dragging.Reproduce
--ozone-platform=x11).I'm not sure what the best fix is. A few options I thought of: only make the window focusable while the chat input is open, a window type or hint that KWin doesn't constrain (keeping the #234 skip atoms), or clamping to the visible pet instead of the whole window. Happy to test anything.
Environment: CachyOS, kernel 7.2.7-1-cachyos, KDE Plasma 6.7.5 / KWin 6.7.5 (Wayland session). Laptop 1: main
f24f934(4.0.0 + #236), 100% scaling, 32 px top panel. Laptop 2: freshopenpets-bin4.0.0-1 from the AUR, 115% scaling.