Skip to content
  • Olivier Fourdan's avatar
    xwayland: Notify of root size change with XRandR emulation · 246ae00b
    Olivier Fourdan authored and Olivier Fourdan's avatar Olivier Fourdan committed
    
    
    Some clients (typically Java, but maybe others) rely on ConfigureNotify
    or RRScreenChangeNotify events to tell that the XRandR request is
    successful.
    
    When emulated XRandR is used in Xwayland, compute the emulated root size
    and send the expected ConfigureNotify and RRScreenChangeNotify events
    with the emulated size of the root window to the asking X11 client.
    
    Note that the root window size does not actually change, as XRandR
    emulation is achieved by scaling the client window using viewports in
    Wayland, so this event is sort of misleading.
    
    Also, because Xwayland is using viewports, emulating XRandR does not
    reconfigure the outputs location, meaning that the actual size of the
    root window which encompasses all the outputs together may not change
    in a multi-monitor setup. To work around this limitation, when using an
    emulated mode, we report the size of that emulated mode alone as the
    root size for the configure notify event.
    
    Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    246ae00b