Closed Bug 1798131 Opened 2 years ago Closed 2 years ago

[X11] Tooltips stay and never disappear when Alt+Tabbing in Linux

Categories

(Core :: Widget: Gtk, defect, P3)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox106 --- wontfix
firefox107 --- wontfix
firefox108 --- wontfix
firefox109 --- disabled
firefox110 --- fixed

People

(Reporter: julienw, Assigned: emilio)

References

(Blocks 1 open bug, Regressed 2 open bugs, Regression)

Details

(Keywords: regression, Whiteboard: [stockwell disable-recommended])

Crash Data

Attachments

(3 files)

I'm using Gnome 3.38 on Debian Stable, and Firefox Nightly 20221025094808 (but I see this for some time now).

When I hover the mouse on something with a tooltip (such as a tab in the tab strip, or the hamburger menu), and then switch to another virtual desktop, the tooltip stays displayed and never disappear until I come back to the initial virtual desktop.

This doesn't seem to happen on thunderbird v91.13 20220908191136 so this might be a regression, I'll run a mozregression.

This happens also when I switch to another window in the same virtual desktop.

In this screencast, at the end I'm switching virtual desktop but for some reason the recorder doesn't see it :-) but you get the idea.

Set release status flags based on info from the regressing bug 1756903

:emilio, since you are the author of the regressor, bug 1756903, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Can you attach about:support contents? Presumably you're using X11, though it probably repros on Wayland as well.

Flags: needinfo?(felash)
Attached file aboutsupport.json

sure, here it is!

Indeed it looks like I'm on X11 here. I kind of thought I was on XWayland... but maybe I switched some time ago and forgot to switch bacK.

Flags: needinfo?(felash)

Are you sure of the regression range? I can still reproduce with MOZ_GTK_TITLEBAR_DECORATION=system, which uses the old code-path...

Flags: needinfo?(emilio) → needinfo?(felash)

Martin do you know how this is supposed to work? I don't see any particular code to hide tooltips on blur so my guess is that this is supposed to be handled by GTK...

Flags: needinfo?(stransky)

It may be caused by different widget hierarchy. We hide tooltips on any event we get (keyboard/mouse) and that's handled by FF itself at nsXULTooltipListener::HideTooltip().

Flags: needinfo?(stransky)
Blocks: gtktitlebar
Priority: -- → P3
Summary: Tooltips stay and never disappear when switching virtual desktops in Gnome → [X11] Tooltips stay and never disappear when switching virtual desktops in Gnome

(In reply to Emilio Cobos Álvarez (:emilio) from comment #8)

Are you sure of the regression range? I can still reproduce with MOZ_GTK_TITLEBAR_DECORATION=system, which uses the old code-path...

Mmm definitely I don't reproduce with this env variable, on latest nightly 20221102094537, on my computer.

Flags: needinfo?(felash)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #10)

It may be caused by different widget hierarchy. We hide tooltips on any event we get (keyboard/mouse) and that's handled by FF itself at nsXULTooltipListener::HideTooltip().

Hmm, but there's nothing that hides on window blur is it? Should CheckForRollup deal with tooltips somehow?

(In reply to Julien Wajsberg [:julienw] from comment #11)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #8)

Are you sure of the regression range? I can still reproduce with MOZ_GTK_TITLEBAR_DECORATION=system, which uses the old code-path...

Mmm definitely I don't reproduce with this env variable, on latest nightly 20221102094537, on my computer.

Can you manage to capture a log with MOZ_LOG=Widget:5,WidgetPopup:5 MOZ_GTK_TITLEBAR_DECORATION=system? That might tell us where this stuff is handled in the working configuration... I still haven't managed to not reproduce this...

Flags: needinfo?(felash)

I took a profile with this profile + putting the logs in markers => https://share.firefox.dev/3zCw5Wj
Hopefully this will be even more useful :-)

BTW I see from the screenshots in this profile that we're missing the CompositorScreenshotWindowDestroyed for these "windows"... This seems to be the case also without MOZ_GTK_TITLEBAR_DECORATION=system. I'll file a bug about that.

Flags: needinfo?(felash)

I can try to do a rr recording if needed, tell me if that would be useful.

Can I see the native stack of a marker? In particular I want to know the stack of this one:

(WidgetPopup) [7f756d5c5000]: nsWindow::Show state 0 frame Frame(7f7576d6ba50) tooltip

Flags: needinfo?(felash)

I made another profile with the stacks for the log markers => https://share.firefox.dev/3T2GLV8

FTR, to get this, one has to add profilerstacks to MOZ_LOG.

Flags: needinfo?(felash)

Set release status flags based on info from the regressing bug 1756903

Flags: needinfo?(emilio)

The stacks of the markers in comment 16 don't seem to work btw, they all have:

    XREMain::XRE_main
    (root)
Duplicate of this bug: 1803058

From bug 1803058, it looks like it's not just Gnome but also KDE.

Summary: [X11] Tooltips stay and never disappear when switching virtual desktops in Gnome → [X11] Tooltips stay and never disappear when switching virtual desktops in Linux

(In reply to Emilio Cobos Álvarez (:emilio) from comment #18)

The stacks of the markers in comment 16 don't seem to work btw, they all have:

    XREMain::XRE_main
    (root)

It is super weird, some logs do have proper stacks but most don't... I'll do another profile for you.

Sadly I'm hitting bug 1779257... No native stacks for markers on Linux until somebody fixes this unfortunate bug.

The main issue is the confusion between mGdkWindow and the toplevel when
we draw with client decorations. Though something else broke since we
enabled them and now even with MOZ_GTK_TITLEBAR_DECORATION=system the
bug reproduces.

The thing that's supposed to hide the tooltip on nsXULTooltipListener is
the mouseout event handler, but without this fix we would upgrade the
eMouseExitFromWidget to a synthesized mouse move here:

https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/dom/events/EventStateManager.cpp#721-732

Make leave-notify handling properly parallel to enter-notify in order to
properly notify gecko of the mouse leaving the window, thus fixing the
bug.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7c3b662ef3fc
Fix leave-notify handling on X11. r=stransky
Attachment #9306312 - Attachment description: Bug 1798131 - Fix leave-notify handling on X11. r=stransky → Bug 1798131 - Fix leave-notify handling on X11 (and stop doing pointer grabbing there). r=stransky

Wow, what a mess, see the updated commit message o.O

Flags: needinfo?(emilio)
Duplicate of this bug: 1800515
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9b1c242dc2e0
Fix leave-notify handling on X11 (and stop doing pointer grabbing there). r=stransky
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Duplicate of this bug: 1607713

Copying crash signatures from duplicate bugs.

Crash Signature: [@ gsignal] [@ libc.so.6 + 0x88650] [@ libgdk-3.so.0 + 0x67fb0]
Crash Signature: [@ gsignal] [@ libc.so.6 + 0x88650] [@ libgdk-3.so.0 + 0x67fb0] → [@ gsignal] [@ libc.so.6 + 0x88650] [@ libgdk-3.so.0 + 0x67fb0]
QA Whiteboard: [qa-109b-p2]

Hey Emilio, I'm running with Nightly 20221213041109, but it looks like it still happens here.
This Firefox runs on xwayland.
On my other Firefox running on wayland, this doesn't happen as expected.
Is there anything you'd like me to try?

Flags: needinfo?(emilio)

I can't repro on the latest nightly on either X11 nor XWayland (nor Wayland of course). I'm using a keyboard shortcut to switch virtual desktops. Before the patch, I could trivially reproduce on X11 by just Alt+Tab-ing to move the Firefox window behind another.

I added some logging here that should show up when switching desktops (if it doesn't then it's an X server bug I suspect). Do you see that? Let's file another bug if you can still repro, with more details about your set-up? I'm using a keyboard shortcut to switch virtual desktops and I don't see this, but the virtual desktop switch on my machine has a rather fancy animation, so maybe we're not using the same setup.

Flags: needinfo?(emilio)
Summary: [X11] Tooltips stay and never disappear when switching virtual desktops in Linux → [X11] Tooltips stay and never disappear when Alt+Tabbing in Linux

This doesn't reproduce with MOZ_GTK_TITLEBAR_DECORATION=system but this does reproduce without it. I'll file a separate bug.

See Also: → 1805703
Blocks: 1607713
No longer duplicate of this bug: 1607713
Blocks: 1386699
Blocks: 510411
Regressions: 1805939
Regressions: 1807482

This was backed out from 109 for the RC2 build to avoid shipping bug 1805939.
https://hg.mozilla.org/releases/mozilla-release/rev/d6f4c3448906

Regressions: 1810797
Regressions: 1820542
Regressions: 1810092
Regressions: 1866651
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: