Skip to content
  • Daniel Boles's avatar
    Tooltip: Fix the used cursor size if 0 in Settings · 9b7d886b
    Daniel Boles authored
    Before the recent rework of positioning in GtkTooltip, the widget always
    used the cursor_size of the GdkDisplay. That work redid this to instead
    take GtkSettings::gtk-cursor-theme-size. But that property's doc says:
    
    > Size to use for cursors, or 0 to use the default size.
    
    and has 0 as its default. This is quite a likely scenario for anyone
    whose desktop or settings.ini does not explicitly provide a cursor size,
    which is the case for XFCE and win32, to name just two common platforms.
    
    Then, it seems getting a cursor_size of 0 causes GtkTooltip to freak out
    and hide/show itself at a very rapid speed, thus making it unusable.
    
    So, we should check whether the Settings return 0 and, if so, still use
    gdk_display_get_default_cursor_size (display) to ensure we get a size.
    
    #1371
    9b7d886b