Skip to content
  • Pekka Paalanen's avatar
    xwayland: detect initially positioned X11 windows · 882aff09
    Pekka Paalanen authored
    
    
    X11 applications expect -geometry command line option to work for
    setting the initial window position, but currently this does not work.
    
    During map, detect X11 windows that set an explicit position. This works
    by heuristics: if window position is not 0,0 then it is explicitly
    positioned. Legacy fullscreen windows are also at 0,0 but these are
    detected earlier.
    
    Explicitly store the window position at map request time to detect
    client-positioned windows, and use it as the suggested initial position.
    weston_wm_window::x and y have been overwritten due to reparenting when
    we eventually need the initial position.
    
    This patch requires that the new set_toplevel_with_position() hook is
    implemented in the shell.
    
    Note that this patch is about positioning xwayland toplevels, not
    override-redirect windows which are already handled.
    
    Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: default avatarQuentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
    882aff09