xwayland: Also follow the primary output
We want to update the XRandR information so that X11 apps know which is the primary display, since some of them make use of it to position themselves.
parent
7580d6c6
-
Seems not work correctly, at least in my case.
After boot xrandr shows
XWAYLAND0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 600mm x 340mm XWAYLAND1 connected 1280x1024+2560+208 (normal left inverted right x axis y axis) 380mm x 300mm
in logs:
kwin_wayland_drm: Reading output configuration for KWin::DrmOutput(0x564ced0892c0, name="DP-1", geometry=QRect(0,0 2560x1440), scale=1) kwin_wayland_drm: Reading output configuration for KWin::DrmOutput(0x564cecf318c0, name="HDMI-A-2", geometry=QRect(0,0 1280x1024), scale=1) kwin_xwl: Setting primary KWin::DrmOutput(0x564ced0892c0, name="DP-1", geometry=QRect(0,0 2560x1440), scale=1) 33
Then I've disconnected DP-1 monitor, in logs see
kwin_wayland_drm: Removing output KWin::DrmOutput(0x564ced0892c0, name="DP-1", geometry=QRect(0,0 2560x1440), scale=1) kwin_xwl: Setting primary KWin::DrmOutput(0x564cecf318c0, name="HDMI-A-2", geometry=QRect(2560,208 1280x1024), scale=1) 35 kwin_wayland_drm: Reading output configuration for KWin::DrmOutput(0x564cecf318c0, name="HDMI-A-2", geometry=QRect(2560,208 1280x1024), scale=1)
But after reconnecting DP-1 again
kwin_wayland_drm: Reading output configuration for KWin::DrmOutput(0x564cedebd5e0, name="DP-1", geometry=QRect(0,0 2560x1440), scale=1) kwin_wayland_drm: Reading output configuration for KWin::DrmOutput(0x564cecf318c0, name="HDMI-A-2", geometry=QRect(0,0 1280x1024), scale=1) kwin_xwl: Setting primary KWin::DrmOutput(0x564cedebd5e0, name="DP-1", geometry=QRect(0,0 2560x1440), scale=1) 35
look at 33 and 35 in 'Setting primary' and xrandr shows now
XWAYLAND1 connected primary 1280x1024+2560+208 (normal left inverted right x axis y axis) 380mm x 300mm XWAYLAND2 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
-
Please register or sign in to comment