Skip to content
  • Matthijs Velsink's avatar
    GtkTooltip: Fix tooltip positioning on X11 · bb1d5e7d
    Matthijs Velsink authored and Matthijs Velsink's avatar Matthijs Velsink committed
    On X11, gdk_window_move_to_rect() uses the position of the window to
    calculate how it should be moved. However, any pending resizes that will
    be executed on show() are not taken into account, resulting in
    incorrectly positioned tooltips in case a tooltip window is re-used
    often. This is not solved by gtk_widget_realize(), as this will do
    nothing if the window is already realized.
    
    Let's add a call to the private gtk_window_move_resize() function, so
    that the size is always recalculated before the window is sent to
    gdk_window_move_to_rect().
    
    This exact fix was also needed in GtkMenu (7298e73c), with similar
    reasoning.
    
    Fixes #2142
    Fixes #2227
    bb1d5e7d