Bug 508775 - Bookmark toolbar submenus unexpectedly close during drag-and-drop in Firefox
Summary: Bookmark toolbar submenus unexpectedly close during drag-and-drop in Firefox
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: Wayland drag-and-drop (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Vlad Zahorodnii
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-26 18:42 UTC by Vlad Zahorodnii
Modified: 2025-09-04 17:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.5.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2025-08-26 18:42:43 UTC
Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1866770

The issue is caused by sending a motion event outside popup bounds before an enter event for the next focused surface.
Comment 1 Bug Janitor Service 2025-09-02 08:56:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8064
Comment 2 Vlad Zahorodnii 2025-09-02 16:34:52 UTC
Git commit 28fe2a786a18a5aad587d5d6ca93b466be4c0be9 by Vlad Zahorodnii.
Committed on 02/09/2025 at 16:13.
Pushed by vladz into branch 'master'.

Fix dnd in Firefox bookmarks toolbar popups

When the pointer crosses between popups, kwin will send a motion event
for the old popup whose coordinates lie outside the corresponding surface
followed by a leave and an enter event for another popup. That motion
event confuses Firefox, it thinks that the pointer has left the popup
so it should be closed.

This change re-arranges the order of motion and enter/leave events so
the latter come first. This is still not a great solution, a motion
event will be sent even if an enter event has been sent, but it is good
enough for the time being.

M  +4    -7    src/input.cpp
M  +2    -2    src/xwayland/databridge.cpp
M  +1    -2    src/xwayland/databridge.h
M  +2    -2    src/xwayland/dnd.cpp
M  +1    -3    src/xwayland/dnd.h
M  +1    -2    src/xwayland/drag.h
M  +2    -2    src/xwayland/drag_wl.cpp
M  +1    -2    src/xwayland/drag_wl.h
M  +5    -4    src/xwayland/drag_x.cpp
M  +1    -2    src/xwayland/drag_x.h
M  +3    -3    src/xwayland/xwayland.cpp
M  +1    -1    src/xwayland/xwayland.h
M  +1    -13   src/xwayland/xwayland_interface.h

https://invent.kde.org/plasma/kwin/-/commit/28fe2a786a18a5aad587d5d6ca93b466be4c0be9