Skip to content
  • Hans de Goede's avatar
    xwayland: Set _XWAYLAND_RANDR_EMU_MONITOR_RECTS property for resolution emulation · 5315f988
    Hans de Goede authored
    
    
    Apps using randr to change the resolution when going fullscreen, in
    combination with _NET_WM_STATE_FULLSCREEN to tell the window-manager (WM)
    to make their window fullscreen, expect the WM to give the fullscreen window
    the size of the emulated resolution as would happen when run under Xorg (*).
    
    We need the WM to emulate this behavior for these apps to work correctly,
    with Xwaylands resolution change emulation. For the WM to emulate this,
    it needs to know about the emulated resolution for the Windows owning
    client for each monitor.
    
    This commit adds a _XWAYLAND_RANDR_EMU_MONITOR_RECTS property, which
    contains 4 Cardinals (32 bit integers) per monitor with resolution
    emulation info. Window-managers can use this to get the emulated
    resolution for the client and size the window correctly.
    
    *) Since under Xorg the resolution will actually be changed and after that
    going fullscreen through NET_WM_STATE_FULLSCREEN will size the window to
    be equal to the new resolution.
    
    Reviewed-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Acked-by: default avatarMichel Dänzer <mdaenzer@redhat.com>
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    5315f988