Skip to content
  • Romain Vimont's avatar
    qt: prevent window jumps on resize (X11) · d7fec54b
    Romain Vimont authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
    On X11 with Qt < 5.10, a resize request invoked XMoveResizeWindow() (see
    0285ba4e
    
    ), which both moves and resizes.
    To avoid moving, it was called with the current geometry() coordinates
    as position arguments.
    
    However, the calculated position may be wrong when several displays have
    a different devicePixelRatio(). As a consequence, on a secondary
    display, every (automatic) resize of the window made it jump to
    unexpected locations.
    
    To avoid the problem, just call XResizeWindow(), so that the window is
    not moved at all.
    
    Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
    d7fec54b