Bug 506731 - partially offscreen window prevents window from refreshing (wayland / electron?)
Summary: partially offscreen window prevents window from refreshing (wayland / electron?)
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.3.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-07 19:45 UTC by andy
Modified: 2025-07-11 21:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andy 2025-07-07 19:45:36 UTC
SUMMARY
Often when a window goes partially offscreen, the rest of the window will stop refreshing and appear frozen, but after moving it back on screen you'll see everything refresh including any typing that occurred.

I run into it every day for as long as I can remember and it definitely makes me question my floating window philosophy. I heavily use "Keep above other windows" to juggle between windows laid out on my screen. Sometimes I move half a window off-screen so I can keep the half of it I need next to another window for a bit. I think this only fails for electron apps.

Example: Have vscode running (native wayland mode) with 3 vertical splits: terminal, editor, editor. I drag the window to the left so everything is offscreen except the rightmost editor section. This gives me space on my screen to have it side-by-side with my web browser as I search something. I type/scroll in my browser, then click into the vscode window only for it to appear frozen, not refreshing with any keyboard or mouse input. But if I drag the whole thing so all borders are back within the desktop it refreshes and I see the mess of blind keyboard/mouse events indicating it responded to inputs but just didn't refresh.

I think sometimes it does stay refreshing for a while, but often it just stops. From what I can tell it seems to be electron apps that are the culprit.

Is this something kwin can fix, or is it on electron's end for doing something wrong? I would lovvvve for this to just work.

STEPS TO REPRODUCE
1. Run an electron app like vscode in native wayland mode
2. Single 4k screen, nvidia graphics
3. Make the vscode window about 80% the size of the full screen
4. Drag it to the left so 2/3 of the window are off-screen
5. (optional) Try to interact with the window with keyboard
6. Click outside the window to some other application. (coincidentally, could be a chromium/electron browser). Do some normal interactions, possibly move/resize this other window.
7. Click back into the vscode window and try selecting text or typing

OBSERVED RESULT
The vscode window will not refresh when partially offscreen

EXPECTED RESULT
The vscode window will refresh when partially offscreen

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: arch linux 6.15.2-arch1-1
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.15.0 
Qt Version: 6.9.1

ADDITIONAL INFORMATION
Comment 1 andy 2025-07-08 03:26:27 UTC
Same thing happens even just having one window with "Keep above others" covering part of the vscode window.

E.g: vscode editor covering 80% of the screen. Bring up browser and toggle on "Keep above others", and try to copy some notes into editor. Maybe 1/3 of the editor is underneath this "Keep above others" window. As I start typing in the editor, after a few words/characters it stops refreshing. If I stop and jiggle either the window on top or underneath, it refreshes. Unfortunately repeatable at the moment.
Comment 2 TraceyC 2025-07-11 20:28:17 UTC
I'm not able to reproduce this in git-master with VS Code and Firefox (set to Keep Above Others), following your steps, on a laptop with a single display.

I also can't reproduce it on Plasma 6.4.2 with the leftmost display of a multi-display setup

I'll leave this open in case others are able to reproduce it.
Comment 3 andy 2025-07-11 21:15:19 UTC
Yeah sorry it's a bit frustrating to not have an exact reproducer. I'll try to find a better reproduction method if possible.

I was just trying like you " VS Code and Firefox (set to Keep Above Others)," and didn't get the effect. Then I tried electron on top of electron (vscode and vivaldi browser) and I reproduced the bug. But then after moving things around again it wouldn't reproduce again. I think there are probably times where this bug doesn't happen, but it's hard to miss when it does.

I thought it could be something nvidia-related, but I remember 6 months ago when I first made a post about it I was using an AMD gpu.