Skip to content
  • Jonas Ådahl's avatar
    tooltip: Implement positioning using gdk_window_move_to_rect() · 14d22cb3
    Jonas Ådahl authored
    In order to make tooltip positioning portable, make use of the
    move_to_rect API. Some semantical changes are made, as identical
    semantics cannot be implemented using the move-to-rect API.
    
    Primarily the implemented semantics are:
    
    Position the tooltip in the center pixels slightly below (defaults to 4
    units below) the tooltipped widget. This is always the case for keyboard
    driven tooltips; the case where it tries to avoid the pointer cursor is
    not implemented.
    
    For pointer position triggered tooltips, implement the following
    additional semantics:
    
    Use the current cursor size to determine the padding used to enlarge the
    anchor rectangle. This is to try to avoid the cursor overlapping the
    tooltip.
    
    If the anchor rectangle is too tall (meaning if we'd be constrained
    and flip on the Y axis, it'd flip too far away from the originally
    intended position), rely only on the pointer position to position the
    tooltip. The approximate pointer cursor rectan...
    14d22cb3