App-name tooltip popover flickers constantly while paging between dock pages
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- desktop
Research direction
Start with the tooltip timeout and popup path in src/BaseItem.vala, then inspect the input-region setup in src/MainWindow.vala and current-position handling in src/AppSystem/Launcher.vala. Compare the reported behavior with the dock and gala responsibilities; done means confirming ownership of the flicker and determining whether disabling the app-name tooltip is an acceptable resolution.
Written by the indexing model from the issue text.
Description
Summary
The name/tooltip popover over a dock item flickers continuously (repeatedly appearing and disappearing) while the pointer rests on the dock. On a static single page the flicker is constant; while paging between workspaces it is especially violent and always breaks out over whichever app icon the pointer happens to land on.
Affected version
| Component | Version |
|---|---|
| elementary OS | 8.1 (Circe) |
| io.elementary.dock | 8.3.3+r868+pkg21~ubuntu8.1 |
| gala | 8.6.1+r3147+pkg134~ubuntu8.1 |
| mutter | 46.2-1ubuntu0.24.04.16 |
| Session | Wayland |
Hardware: Intel Skylake GT2 [HD Graphics 520] (ThinkPad X270).
Pointer: both touchpad and trackpoint are affected (details below).
Steps to reproduce
- Have more workspaces than one, so the dock has several pages (
num-workspaces= 4 here). - Put the pointer over an app icon in the dock.
- Change page / workspace, using any of:
- a three-finger horizontal touchpad swipe on the dock (
three-finger-swipe-horizontal=switch-to-workspace), or - paging with the trackpoint middle button held down.
- a three-finger horizontal touchpad swipe on the dock (
- Leave the pointer resting over an app icon.
Expected behaviour
Either no tooltip, or a single, stable app-name popover that stays put until the pointer leaves the item.
Actual behaviour
The popover appears and disappears repeatedly, i.e. it flickers. It is drawn right next to the pointer / on the dock (not centered on screen).
Observed dependency on pointer position — this seems important:
- If, after paging, the pointer ends up over an app icon, the flicker is very likely to appear.
- If the pointer ends up in a gap between icons, it usually does not.
Observed dependency on how paging is triggered:
- Touchpad three-finger swipe: flicker is essentially guaranteed.
- Trackpoint middle button held down: flickers while the button is held; if the button is released immediately after paging, there is no flicker.
What I already investigated (and what did not work)
I rebuilt io.elementary.dock from source and disabled the tooltip at its only popup site. In src/BaseItem.vala:
private void wait_and_show_tooltip (uint delay_ms) {
- if (!popover_menu.visible && tooltip_text != null) {
+ if (!popover_menu.visible && tooltip_text != null && delay_ms > 0) {
together with the call site wait_and_show_tooltip (100) becoming wait_and_show_tooltip (0).
This is the only place popover_tooltip.popup () is called (src/BaseItem.vala:335), and it does fix the static, non-paged case.
It does not fix the flicker while paging.
Instrumented test
To find out whether the flicker even goes through the dock's own event handling, I added temporary logging inside the dock (writing to a file, since the dock's stdout is owned by gala):
- in the
Gtk.EventControllerMotionenter/leavehandlers, - at the start of
wait_and_show_tooltip, - at the
popover_tooltip.popup ()call, - and on
notify["current-pos"]insrc/AppSystem/Launcher.vala.
The logger was verified to be alive and sensitive before the test: a rebuild logged 13 CONSTRUCT lines and 17 position-change lines.
Then the reproduction steps above were performed (sweeping the icons, three-finger touchpad paging, trackpoint middle-button paging):
| Event | Count |
|---|---|
| construct | 13 |
| position changed | 17 |
| motion enter | 0 |
| motion leave | 0 |
| tooltip popup attempt | 0 |
So while the pointer is over the dock and apps visibly respond to hover and clicks, the dock process receives no pointer motion events at all.
That suggests the flickering box during paging is not produced by the dock's own widget/event code, but drawn at the compositor level. I could not pin down the exact drawing site inside gala, and I did not want to patch a window manager on a guess, so I stopped there.
Related history
The tooltip was changed from a plain Gtk.Tooltip to a Gtk.Popover (PopoverTooltip) in #441 ("Replace tooltip with popover"), to fix the tooltip being drawn behind the dock (#422).
That change is also what introduced the Gtk.Popup-based tooltip and the 100 ms delay this report touches, added as a workaround for #559 in #563 ("Workaround for crashing when many tooltips are shown consecutively"). That PR notes the root cause was a GTK/Gtk.Popup problem:
the culprit seems to be the Nvidia driver, which causes a problem with GTK.Popup, which is used as tooltips when hovering launchers in the doc since #441
So the tooltip mechanism has a known history of behaving badly, and the paging-time flicker reported here may well be another symptom of the same popover-based approach rather than a separate bug in the tooltip logic itself.
I could not find an existing issue covering this particular flicker, so I am filing it separately — please close/redirect if it is a duplicate.
Possibly relevant code
src/MainWindow.vala sets a manual input region, with a top margin offset. TOP_MARGIN = 64 corresponds to dock-window { margin-top: 64px } in data/Application.css ("Keep enough room so that icons don't clip when bouncing"):
// Matches top margin in Launcher.css
private const int TOP_MARGIN = 64;
...
surface.layout.connect ((surface, width, height) => {
var item_manager_width = ItemManager.get_default ().get_width ();
var shadow_size = (width - item_manager_width) / 2;
var top_margin = TOP_MARGIN + shadow_size;
surface.set_input_region (new Cairo.Region.rectangle ({
shadow_size,
top_margin,
item_manager_width,
height - top_margin
}));
This may be related to the dock not seeing motion events, though the region does appear to cover the icons.
Also note the existing workaround in src/BaseItem.vala, and https://github.com/elementary/dock/issues/559 which it references:
// Add timeout to avoid "Error 71 (Protocol error) dispatching to Wayland display".
// This error is probably caused by a bug in GTK caused by the Nvidia driver at least up to v580.
// See https://github.com/elementary/dock/issues/559
open_tooltip_timeout_id = GLib.Timeout.add_once (delay_ms, () => {
Request
Please confirm whether the paging-time flicker is expected to be handled by the dock or by gala, and whether an option to disable the item-name tooltip entirely is acceptable. A plain "never show the app-name popover" setting would be enough for my use case, and would also be a reasonable escape hatch for anyone hitting the GTK/Wayland issues referenced above.
- Dominant language
- Vala
- Stars
- 110
- Forks
- 42
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elementary/dock
-
Needs Design Priority: Wishlist
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
elementary/dock#620 · 1 reaction ·
-
Needs Design Priority: Wishlist
Difficulty 4/5 3-5 days Newbie friendliness 48/100
elementary/dock#617 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
elementary/dock#618 · 2 comments ·
-
New Incognito WindowOpen
Difficulty 4/5 3-5 days Newbie friendliness 55/100
elementary/dock#614 ·
-
Needs Design Priority: Wishlist
Difficulty 5/5 Over a week Newbie friendliness 35/100
elementary/dock#612 ·
Similar issues
-
enhancement user-priority/P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
PCL-Community/PCL-CE#3658 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Multiple changes in Page Properties and Page Numbers are not saved togetherPossibly taken @jage9 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aphtech/brailleblaster#167 ·
Maintainers usually reply within 1 day
-
アプリ: チャット 優先: 中 提案
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
yksr-melt/Meltype#243 · 1 comment ·
Maintainers usually reply within 1 day