Bug 404730

Summary: XWayland output dimensions capped
Product: [Plasma] kwin Reporter: Roman Gilg <subdiff>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Roman Gilg 2019-02-23 09:34:32 UTC
SUMMARY
If an output is hot-plugged, which is placed to the left of the current one, somewhat the overall X screen size is not updated correctly making space on the right output non-reachable via pointer device.

This can be made explicit with Steam in BPM. The cursor stops in the middle of the screen and does not move further to the right.

STEPS TO REPRODUCE
1. Hot-plug second output, which is placed in compositor space to the left of the current one.
2. Start Steam in BPM on the right monitor.
3. Try to move mouse to the right edge of the right monitor in BPM.

OBSERVED RESULT
Cursor stops moving in the middle of the screen.

EXPECTED RESULT
Cursor continues moving until it hit the right edge of the right screen.
Comment 1 Martin Flöser 2019-02-23 12:14:51 UTC
That sounds like a problem of xwayland to me.
Comment 2 Roman Gilg 2019-02-23 15:01:43 UTC
I thought this too at first, so I went through all the XWayland and X mouse setter input code.

But it's this explicit done call:
https://cgit.kde.org/kwin.git/tree/abstract_output.cpp#n105

XWayland expects the wl_output and xdg-output done calls to always come in pairs. But when the wl_output position is not changed our KWayland::Server::OutputInterface does not send a done event.

Then next time a pair is sent not all xdg-output information is already sent, but XWayland thinks from previous done that xdg-output data has already arrived.
Comment 3 Martin Flöser 2019-02-23 15:56:07 UTC
But that's an invalid assumption on xwayland side.
Comment 4 David Edmundson 2021-03-22 11:42:28 UTC
This should now be fixed