Skip to content
Commit f91ae3e9 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

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
  • Author Developer

    @glooom would you be able to report it in bugs.kde.org? Will look into it as soon as I can.

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment