SUMMARY Handling Xwayland apps while using scaling and multi monitor setups has been improved a lot recently, but one issue kind of stayed. Bellow is link to demo on video. In my test I have laptop with its internal 1080p screen set to 125% and external 1440p monitor with native 100%. What I do is closing and opening laptops' lid causing the internal screen to go away and back on. Xwayland windows content is not properly updated until the window is at least moved, either leaving empty transparent space, or the content is too big to fit in the window. Previously when I tested it with 5.x series, iirc it would only update on window resize, so now it's a bit better. Some have also inappropriate scale and window content gets too small, but this report is not about that, I'm aware of the current Xorg/Xwayland limitations. STEPS TO REPRODUCE 1. Use multi screen setup with mixed dpi 2. Open some Xwayland app 3. Remove or add output with a scaling OBSERVED RESULT Xwayland window content is not properly updated until its window is moved EXPECTED RESULT Xwayland windows are updated automatically without a need to move/resize etc SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Arch Linux, kde-unstable (available in About System) KDE Plasma Version: 5.93.0 KDE Frameworks Version: 5.249.0 Qt Version: 6.7.0 ADDITIONAL INFORMATION Video demo https://www.dropbox.com/scl/fi/lq7voksaxdgpr6kwzdbfs/xwayland-apps-multi-dpi.mkv?rlkey=xqsmq26eju51w312u2abcq6h1&dl=0
Thank you for your bug report! Unfortunately setting per-monitor scaling using tools like xrandr in the X11 session is not supported. KDE only supports per-monitor scaling in the plasma session.
Oh sorry that was a mistake -- I thought you were on X11
(In reply to fanzhuyifan from comment #2) > Oh sorry that was a mistake -- I thought you were on X11 Yes, that is Wayland session and Iām using everything as is without messing with xrandr or anything manually.
I cannot reproduce this, when turning off a screen an Xwayland app on the screen that stayed on doesn't appear to be effected in any way. An Xwayland app on the screen turned off reappears on the screen not turned off at the proper scale. Neon Testing, Plasma 5.92.90, Frameworks 5.249.0, Qt 6.6.1
(In reply to Doug from comment #4) > I cannot reproduce this, when turning off a screen an Xwayland app on the > screen that stayed on doesn't appear to be effected in any way. An Xwayland > app on the screen turned off reappears on the screen not turned off at the > proper scale. > > Neon Testing, Plasma 5.92.90, Frameworks 5.249.0, Qt 6.6.1 That is also true for me if the app window sits on a scaled screen. In the case I'm describing (and as you can also see on the video), Xwayland windows are placed on unscaled 100% screen, and the screen I add or remove is at 125% scale.
A much simpler way to test this is to just have one display connected and change the scale while having X11 windows open. Can confirm
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5085
Git commit c2749e3acf974d47127f899549919ae19c9e9719 by Xaver Hugl. Committed on 02/02/2024 at 01:00. Pushed by zamundaaa into branch 'master'. x11window: explicitly resize when the Xwayland scale changes With how Xwayland scaling works, KWin assumes the window already uses the new coordinate system - but that doesn't happen until Xwayland and the client know about the new size as well. M +8 -0 src/x11window.cpp M +1 -0 src/x11window.h https://invent.kde.org/plasma/kwin/-/commit/c2749e3acf974d47127f899549919ae19c9e9719
Git commit 63868e4dd491da2e9cd28a0115566408d202ad8a by Xaver Hugl. Committed on 02/02/2024 at 01:06. Pushed by zamundaaa into branch 'Plasma/6.0'. x11window: explicitly resize when the Xwayland scale changes With how Xwayland scaling works, KWin assumes the window already uses the new coordinate system - but that doesn't happen until Xwayland and the client know about the new size as well. (cherry picked from commit c2749e3acf974d47127f899549919ae19c9e9719) M +8 -0 src/x11window.cpp M +1 -0 src/x11window.h https://invent.kde.org/plasma/kwin/-/commit/63868e4dd491da2e9cd28a0115566408d202ad8a