Skip to content

fix(tooltips): keep dynamic tooltips from resetting hover delay - #5212

Merged
Alexays merged 1 commit into
Alexays:masterfrom
bjnobre:fix/dynamic-tooltip-updates
Jul 21, 2026
Merged

fix(tooltips): keep dynamic tooltips from resetting hover delay#5212
Alexays merged 1 commit into
Alexays:masterfrom
bjnobre:fix/dynamic-tooltip-updates

Conversation

@bjnobre

@bjnobre bjnobre commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Cache ALabel tooltip markup and provide it through query-tooltip instead of repeatedly setting GtkWidget's tooltip-markup property. This prevents frequently updating modules from restarting GTK's display-wide tooltip timer.

Keep the active tooltip updated directly so dynamic tooltip contents continue refreshing while the pointer remains stationary.

Problem

Setting tooltip-markup queues a display-wide GTK tooltip query. A
module updating more frequently than GTK's hover delay continually
restarts that delay, preventing its own tooltip—and potentially other
modules' tooltips—from appearing.

Testing

Tested with a custom module updating its displayed text and tooltip every
250 ms, alongside a static control module.

Verified that:

  • Both tooltips appear normally.
  • The rapidly updating tooltip refreshes while the pointer remains still.
  • The rapidly updating module no longer prevents the control tooltip
    from appearing.
  • The patched production build compiles and runs with the existing
    Waybar configuration.

Related issues

Related to #4801, #4519, and #4842.

#4812 restored dynamic tooltip synchronization by repeatedly setting
tooltip-markup, but was reverted because doing so resets GTK's hover
state. #4900 subsequently avoided redundant property assignments by
deduplicating identical markup.

That does not cover genuinely dynamic tooltip content: when the value
changes on every update, every assignment is non-redundant and GTK's
display-wide tooltip delay is still continually restarted. This change
provides tooltip content through query-tooltip and updates an already
active tooltip directly, preserving both initial display and live
updates.

Checklist

  • Code is formatted with clang-format
  • Builds locally (ninja -C build)
  • N/A, no user-facing option
    changed
  • Tested against the affected module(s)

Cache ALabel tooltip markup and provide it through query-tooltip instead of repeatedly setting GtkWidget's tooltip-markup property. This prevents frequently updating modules from restarting GTK's display-wide tooltip timer.

Keep the active tooltip updated directly so dynamic tooltip contents continue refreshing while the pointer remains stationary.
@Alexays
Alexays merged commit 30610d3 into Alexays:master Jul 21, 2026
10 checks passed
@Alexays

Alexays commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Thanks!

@bjnobre
bjnobre deleted the fix/dynamic-tooltip-updates branch July 21, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants