Closed Bug 1993660 Opened 1 year ago Closed 10 months ago

[wayland][KDE] Holding down left mouse button while clicking hamburger menu button causes hover misalignment at top-left window area instead of inside popup

Categories

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

Firefox 143
defect

Tracking

()

RESOLVED MOVED
Tracking Status
firefox-esr115 --- wontfix
firefox-esr140 --- wontfix
firefox143 --- wontfix
firefox144 --- wontfix
firefox145 --- wontfix
firefox146 --- fix-optional

People

(Reporter: github, Unassigned)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0

Steps to reproduce:

On the back, forward of hamburger menu, hold down the button instead of clicking. When the menu appears, continue holding and move your mouse down.

Cachyos under KDE Plasma with Wayland. This is a dual monitor system with 150% display scaling. This also reproduces under TuxedoOS with the same configuration.

Actual results:

The mouse cursor will be in the wrong position, not interacting with any menu items but instead interacting with other interface elements on firefox. The offset seems to be a bit unpredictable, but biases towards the left side of the window. This continues until the mouse is released, where the cursor behaves normally again.

Expected results:

The selection should reflect the mouse cursor

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Bug 1992198 may fix it.

Flags: needinfo?(stransky)
Priority: -- → P2

Can you check if you see it with scale 100%?
Thanks.

Flags: needinfo?(stransky) → needinfo?(github)

I can reproduce this with 100% scale on a single display Kubuntu 25.04 live USB. Does not occur on Ubuntu 25.10 GNOME. Happens regardless of window maximized state or titlebar CSD. Happens with Wayland but not XWayland.

It has similarities to Bug 1987057 but has an older regression window.

Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=967ae1edad41790a5a1fde2f1591731784117c7a&tochange=3e93c8e836ff3fb0c0a953d6451adf188ada355f

Possibly regressed by Bug 1755323.

Blocks: wayland-kde
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Regressed by: 1755323
See Also: → 1987057
Summary: Holding down a menu button under linux/wayland causes the mouse cursor to lose alignment → [wayland][KDE] Holding down left mouse button while clicking hamburger menu button causes hover misalignment at top-left window area instead of inside popup

From the regression range it seems like another subsurface vs. xdg_popup difference in kde.

Please run on terminal with 100% scale with MOZ_LOG="Widget:5 WidgetPopup:5" and attach the log here.
Is that reproducible on single monitor system with 100% scale?
Thanks.

Flags: needinfo?(ke5trel)

This might be due to the implicit grab. When a pointer button is pressed, an implicit grab will be established, meaning that the focus won't change until the button is released. Maybe kwin needs to relax the implicit grab restrictions, I don't know what mutter does, maybe it allows the wl_pointer focus surface to change as long as surfaces are owned by the same client who received the button press event.

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

Log captured on single monitor at 100% scale.

Flags: needinfo?(ke5trel)

(In reply to Vlad Zahorodnii [:zzag] from comment #7)

This might be due to the implicit grab. When a pointer button is pressed, an implicit grab will be established, meaning that the focus won't change until the button is released. Maybe kwin needs to relax the implicit grab restrictions, I don't know what mutter does, maybe it allows the wl_pointer focus surface to change as long as surfaces are owned by the same client who received the button press event.

Vlad, may it be a difference between xdg_popups and subsurface based ones? Firefox switched from xdg_popups to subsurface ones if popup fits in Firefox toplevel window.

Kestrel, do you see the but if you make Firefox window smaller that hamburger popup so Firefox is forced to use xdg_popup ?
Thanks.

Flags: needinfo?(ke5trel)

I can confirm shrinking the window so the hamburger menu no longer fits does indeed "fix" the problem, so your theory is likely correct.

Flags: needinfo?(github)

Okay, looks like KDE bug then.

Flags: needinfo?(vlad.zahorodnii)

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

(In reply to Vlad Zahorodnii [:zzag] from comment #7)

This might be due to the implicit grab. When a pointer button is pressed, an implicit grab will be established, meaning that the focus won't change until the button is released. Maybe kwin needs to relax the implicit grab restrictions, I don't know what mutter does, maybe it allows the wl_pointer focus surface to change as long as surfaces are owned by the same client who received the button press event.

Vlad, may it be a difference between xdg_popups and subsurface based ones? Firefox switched from xdg_popups to subsurface ones if popup fits in Firefox toplevel window.

Kestrel, do you see the but if you make Firefox window smaller that hamburger popup so Firefox is forced to use xdg_popup ?
Thanks.

Too late, but yeah kwin will allow focused surface to be changed if it's a subsurface.

Upstream bug report https://bugs.kde.org/show_bug.cgi?id=477740

Flags: needinfo?(vlad.zahorodnii)
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → MOVED
Flags: needinfo?(ke5trel)
See Also: → 2001910
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: