Bug 417378 - Plasma applet sub-menu of context menu appears as a separate window
Summary: Plasma applet sub-menu of context menu appears as a separate window
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Arch Linux Linux
: HI normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords: wayland
: 401213 426784 431018 431919 432250 432430 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-10 12:45 UTC by Patrick Silva
Modified: 2021-05-15 16:49 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.82
Sentry Crash Report:


Attachments
screenshot (475.62 KB, image/png)
2020-02-10 12:45 UTC, Patrick Silva
Details
Context menu of icons on desktop is also affected (435.39 KB, image/png)
2020-02-10 12:55 UTC, Patrick Silva
Details
Yakuake screenshot (104.95 KB, image/png)
2020-09-07 21:28 UTC, Alexander Potashev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-02-10 12:45:18 UTC
Created attachment 125817 [details]
screenshot

SUMMARY
This bug does not occur when no window is open or all windows are minimized.

STEPS TO REPRODUCE
1. start Wayland session
2. open any window
3. right click on digital clock and hover over "Copy to clipboard..." or "Add panel" entries

OBSERVED RESULT
As we can see in the attached screenshot, submenu opens in wrong position and has window decoration.

EXPECTED RESULT
submenu should open in correct position without window decoration

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.68.0
Qt Version: 5.13.2
Comment 1 Patrick Silva 2020-02-10 12:55:47 UTC
Created attachment 125819 [details]
Context menu of icons on desktop is also affected
Comment 2 Patrick Silva 2020-02-13 16:21:10 UTC
*** Bug 401213 has been marked as a duplicate of this bug. ***
Comment 3 Vlad Zahorodnii 2020-08-17 18:58:21 UTC
*** Bug 423332 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Potashev 2020-09-07 21:27:49 UTC
Similar problem here on Fedora 32 (Plasma Wayland 5.18.5, KF 5.70.0, Qt 5.14.2):

1. Run Yakuake
2. Also run another app, e.g. Konsole
3. Press F12 to bring up Yakuake
4. Click on the Konsole window to transfer focus to it (Yakuake should be configured to stay on screen when losing focus.)
5. Right-click inside the Yakuake window


OBSERVED RESULT
As we can see in the attached screenshot, context menu opens in wrong position and has window decoration.

EXPECTED RESULT
context menu should open in correct position without window decoration
Comment 5 Alexander Potashev 2020-09-07 21:28:14 UTC
Created attachment 131484 [details]
Yakuake screenshot
Comment 6 Patrick Silva 2020-09-21 03:08:38 UTC
*** Bug 426784 has been marked as a duplicate of this bug. ***
Comment 7 Patrick Silva 2020-10-16 21:03:52 UTC
dupe of bug 411448 ?
Comment 8 Nate Graham 2021-02-02 16:25:58 UTC
*** Bug 432250 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2021-02-02 21:01:33 UTC
*** Bug 432430 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-03-04 19:45:18 UTC
Confirmed.
Comment 11 Vlad Zahorodnii 2021-03-05 10:47:14 UTC
plasma most likely doesn't set the transient parent window, it's not a kwin bug
Comment 12 Nate Graham 2021-03-20 02:58:03 UTC
*** Bug 431919 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2021-03-20 02:58:26 UTC
*** Bug 431018 has been marked as a duplicate of this bug. ***
Comment 14 David Redondo 2021-04-23 09:06:53 UTC
Git commit 603c0b5a02956765b3dfdab2436a56d1b8122348 by David Redondo.
Committed on 23/04/2021 at 09:03.
Pushed by davidre into branch 'master'.

Set a transientParent for the FolderView ContextMenu

We already had the possibility to specify a visualParent but never did.
The positioning below the parent is not optimal because the Delegates
include the spacing between rows at their bottom which was likely never
discovered because the visualParent was never set. So just set it always
to the cursor position.

M  +3    -3    containments/desktop/package/contents/ui/FolderView.qml
M  +5    -7    containments/desktop/plugins/folder/foldermodel.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/603c0b5a02956765b3dfdab2436a56d1b8122348
Comment 15 David Redondo 2021-04-23 09:12:55 UTC
Git commit 30f74282fbb4252f18786737765a83dcae3d8b88 by David Redondo.
Committed on 23/04/2021 at 09:12.
Pushed by davidre into branch 'Plasma/5.21'.

Set a transientParent for the FolderView ContextMenu

We already had the possibility to specify a visualParent but never did.
The positioning below the parent is not optimal because the Delegates
include the spacing between rows at their bottom which was likely never
discovered because the visualParent was never set. So just set it always
to the cursor position.


(cherry picked from commit 603c0b5a02956765b3dfdab2436a56d1b8122348)

M  +3    -3    containments/desktop/package/contents/ui/FolderView.qml
M  +5    -7    containments/desktop/plugins/folder/foldermodel.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/30f74282fbb4252f18786737765a83dcae3d8b88
Comment 16 Nate Graham 2021-04-23 20:04:41 UTC
With current git master, I can still reproduce this issue only with Plasma applet context menu sub-menus. Everything else seems to be fixed.
Comment 17 Patrick Silva 2021-04-25 10:04:03 UTC
On neon unstable I can reproduce with submenus of Plasma panel, with steps from comment 4, and duplicate bug 423332 is still reproducible,
Comment 18 Nate Graham 2021-04-25 16:43:26 UTC
Oops, that sould have been marked as a duplicate of Bug 430662, not this one. Sorry.
Comment 19 David Redondo 2021-04-27 06:45:00 UTC
Git commit 27299d1405f6d26f6fa62b3337ab23e0924c1604 by David Redondo.
Committed on 27/04/2021 at 06:44.
Pushed by davidre into branch 'master'.

ContainmentInterface: Set transient parent of submenues

The actions added by plugins or applets can contain actions that are
menues. This causes a problem for the panel because it doesn't take
focus when right clicked. Since the menues had no transientParent, they
were created as new toplevels.

M  +11   -0    src/scriptengines/qml/plasmoid/containmentinterface.cpp

https://invent.kde.org/frameworks/plasma-framework/commit/27299d1405f6d26f6fa62b3337ab23e0924c1604
Comment 20 Patrick Silva 2021-04-28 11:02:46 UTC
Bug with menus of Plasma panel is fixed on neon unstable. \o/
But bug described in comment 4 persists.
Should we open a new report for it?
Comment 21 Nate Graham 2021-04-28 15:16:35 UTC
Yes, that will be caused by the same issue (not setting a parent for the menu) in Yakuake.
Comment 22 Patrick Silva 2021-05-15 16:49:09 UTC
to everyone interested on yakuake bug: see bug 437163