Skip to content
  • Hans de Goede's avatar
    xwayland: Add support for randr-resolution change emulation using viewport · d99b9ff0
    Hans de Goede authored
    
    
    Add support for per client randr-resolution change emulation using viewport,
    for apps which want to change the resolution when going fullscreen.
    
    Partly based on earlier work on this by Robert Mader <robert.mader@posteo.de>
    
    Note SDL2 and SFML do not restore randr resolution when going from
    fullscreen -> windowed, I believe this is caused by us still reporting the
    desktop resolution when they query the resolution.  This is not a problem
    because when windowed the toplevel window size includes the window-decorations
    so it never matches the emulated resolution.
    
    One exception would be the window being resizable in Windowed mode and the
    user resizing the window so that including decorations it matches the
    emulated resolution *and* the window being at pos 0x0. But this is an
    extreme corner case. Still I will submit patches upstream to SDL2
    and SFML to always restore the desktop resolution under Xwayland,
    disabling resolution emulation all together when going windowed.
    
    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>
    d99b9ff0