Skip to content
  • Pekka Paalanen's avatar
    xwm: detect legacy fullscreen on MapRequest · 505237e9
    Pekka Paalanen authored
    
    
    The legacy fullscreen state needs to be detected at MapRequest time,
    because that is when the X11 client has alredy set up the initial window
    state.
    
    Doing it at xserver_map_shell_surface() meant that it would be done as a
    response to Xwayland creating the wl_surface and XWM receiving the
    WL_SURFACE_ID ClientMessage, whichever came later. At that point the X11
    client might still be setting things up in theory, though in practice
    most of the X11 communication has already happened when
    xserver_map_shell_surface() gets called.
    
    The real reason for this is to clean up xserver_map_shell_surface() from
    everything that would affect drawing the decorations. This patch is one
    part of that clean-up.
    
    The weston_output_weak_ref logic is not put into compositor.h, because
    there are no other users for it at this time. We need to protect against
    the output going away.
    
    A side-effect of this patch is that saved_width and saved_height will
    now get overwritten also for legacy fullscreen windows. Previously, they
    were left to zero as far as I could tell.
    
    NOTE: This stops override-redirect legacy fullscreen windows from being
    detected as fullscreen. MapRequest processing does not happen for OR
    windows. These windows get detected as type XWAYLAND instead.
    
    Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: default avatarQuentin Glidic <sardemff7+git@sardemff7.net>
    505237e9