Summary: | [Wayland] Hamburger menu opens as window if app window is unfocused | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kconfigwidgets | Reporter: | guimarcalsilva |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bugseforuns, felixernst, jebin12raj, kde, kfm-devel, nate |
Priority: | NOR | Keywords: | wayland |
Version: | 5.86.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=444312 | ||
Latest Commit: | https://invent.kde.org/frameworks/kconfigwidgets/commit/82c40f18709484fd462643aa113a8ccf961b646a | Version Fixed In: | 5.89 |
Sentry Crash Report: |
Description
guimarcalsilva
2021-09-13 08:47:18 UTC
Moving to dolphin until kwin is proven to be at fault. (In reply to David Edmundson from comment #1) > Moving to dolphin until kwin is proven to be at fault. Well, the issue also happens with Gwenview, so ir can't be expecific to Dolphin. Could be an issue in KHamburgerMenu itself too. Given that it happens in both apps, moving to where it lives for now. Yes, my guess is that the bug is produced because no parent is set for the QMenu in KHamburgerMenuPrivate::newMenu(). It is saved in a std::unique_ptr currently which makes the normal workaround (https://community.kde.org/Guidelines_and_HOWTOs/Wayland_Porting_Notes#Popup_Menus) to this not easily applicable. It is also doubly tricky because this menu is set to be the menu of any potential amount of hamburger menus that the application might want to place anywhere including in multiple windows. In practice we are not doing that currently but this means that there is no clear parent window that can be reliably chosen and expected to be alive for longer than the QMenu itself. Similar bug affects Yakuake, see bug 437163 On System Settings this bug doesn't happen because clicking on the hamburger menu focuses the window first and then you have to click again to activate it. Would it be possible to make the hamburger menu non-interactive if the window is unfocused? A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kconfigwidgets/-/merge_requests/83 Git commit 82c40f18709484fd462643aa113a8ccf961b646a by Nate Graham, on behalf of Felix Ernst. Committed on 09/11/2021 at 17:22. Pushed by ngraham into branch 'master'. Fix hamburger menu opening as a window on Wayland Before this commit, if an app window is unfocused and the first click on the window is the hamburger menu button, the menu would appear displaced as a separate window on Wayland. This commit fixes this by setting a sane transientParent for the menu. This is slightly difficult because there can be any number of hamburger buttons in any number of different windows so we need to figure out spontaneously which button was pressed to open the menu. M +24 -2 src/khamburgermenuhelpers.cpp M +1 -1 src/khamburgermenuhelpers_p.h https://invent.kde.org/frameworks/kconfigwidgets/commit/82c40f18709484fd462643aa113a8ccf961b646a *** Bug 444355 has been marked as a duplicate of this bug. *** |