Bug 444468

Summary: Sometimes a context menu won't go away even after it's program is closed.
Product: [Plasma] kwin Reporter: Satyam <vayu>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: dex.mbox, mdavidbennett, nate
Priority: NOR    
Version First Reported In: 5.23.0   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Dialog won't go away
screen as I wrote this bug

Description Satyam 2021-10-27 04:53:12 UTC
Created attachment 142929 [details]
Dialog won't go away

SUMMARY
Since the 5.23 update a right click context menu sometimes gets stuck on my desktop and won't close.  I've had it happen with context menus from Dolphin, Kate and Firefox.

When that happens I've tried quitting and restarting plasmashell, I've tried changing the desktop wallpaper.  The only way I've found to get rid of it besides rebooting is to log out and back in.  I've tried to find a window id with `xwininfo -tree -root` and also `wmctrl -l` and neither shows a window corresponding to the dialog.

The dialog stays on top of any other window on the desktop.  Nothing will cover it except another right click context menu. It behaves as if there is nothing there.  No clicking or right clicking alters it. Right click pulls up the desktop context menu. If I move a program window on top of it the dialog stays on top but if there's something on the program that can be clicked besides being on top the dialog doesn't interfere with the click.  For example if I have a browser with a hyperlink behind the dialog, clicking would still activate the hyperlink.

Unfortunately I haven't found a reliable way to reproduce this problem, but it does happen at least twice a day. And the only way to get rid of it is to logout out and back in.

Attached is a screenshot
SOFTWARE/OS VERSIONS

KDE Plasma Version:  5.23.0
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Comment 1 Satyam 2021-10-27 05:01:05 UTC
The screenshot doesn't look exactly like the dialog. On the screenshot there's a band of white on part of the dialog. On the desktop the whole dialog is intact.

The dialog is from a dolphin instance that has been closed.

If you can read it, the Konsole window on the screenshot has `wmctrl -l`
Comment 2 dexter 2022-03-05 01:04:45 UTC
I'm seeing this now in Fedora F35 & previously, in all applications randomly
plasma version 5.24.2
frameworks 5.91
Qt 5.15.2
X11
kernel 5.16.12
Comment 3 dexter 2022-03-05 01:14:59 UTC
Created attachment 147285 [details]
screen as I wrote this bug
Comment 4 Satyam 2022-03-05 01:27:22 UTC
(In reply to dexter from comment #3)
> Created attachment 147285 [details]
> screen as I wrote this bug

Restarting kwin is the least painful way out I've found:

killall kwin_x11 && kwin_x11 &
Comment 5 David Edmundson 2023-09-06 10:38:45 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.