Xwayland bad cursor positioning after displayport monitor hotplug
- Left monitor, 2560x1440 DVI (primary monitor)
- Right monitor, 1920x1200 DisplayPort
- Debian Buster amd64, Xwayland 1.20.4, Kwin_wayland 5.14.5
Steps to reproduce:
- Use PC normally
- Open an XWayland app (e.g. Chromium) on left monitor, interact with it normally
- Turn off right-monitor.
- For DisplayPort this causes a hotplug event, all open windows move to the left monitor, kwin "compositor settings" window pops up
- Turn on right-monitor.
- Open windows move back
- Expected to still be able to interact with XWayland apps normally
What goes wrong:
- Mouse input on all xwayland apps on left monitor is not properly recognized.
- Some input is recognized, but, with a bad relative offset. Or it's only recognized outside of a 1920x1200 region on the 2560x1440 display
- This includes click events being misdirected to wrong parts of the window, it affects dragging window, it affects mouse-hover on UI elements etc
Native wayland apps (Qt QML-based, ...) are not affected and can be used normally on both screens after the hotplug event.
Xwayland apps work fine when moved back to the right-hand monitor (e.g by alt-drag, since dragging on window decoration is unreliable) and repeatably stop working fine when moved back to the left-hand monitor
I am reporting this as an XWayland bug because it seems like only apps running under xwayland are affected,