Bug 473714 - Global Menu sometimes shows menu from non-active app
Summary: Global Menu sometimes shows menu from non-active app
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Menu widget (show other bugs)
Version: 5.27.7
Platform: Debian testing Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-24 08:32 UTC by Sadi
Modified: 2025-01-09 22:31 UTC (History)
3 users (show)

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


Attachments
Global Menu still showing Elisa menu after it's minimized while Window Title area becomes blank (16.74 KB, image/jpeg)
2023-08-29 07:55 UTC, Sadi
Details
Window Title displaying Elisa only when its window is active (19.53 KB, image/jpeg)
2023-08-29 08:05 UTC, Sadi
Details
MacOS Ventura with the same orphan menu problem (175.14 KB, image/jpeg)
2023-09-14 07:36 UTC, Sadi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sadi 2023-08-24 08:32:33 UTC
This has been around for some time actually, and there are two different problems probably related to the same issue.

1) I have a startup script that launches Elisa and then immediately minimizes its window upon login. But the Global Menu applet still displays its menu. However, Window Title applet doesn't do that, e.g. after Elisa is minimized, its title goes off.

2) Sometimes Global Menu displays the previous active app menu when it can't show any menu from the current, which happens with some (not all) GTK apps, like Synaptic Package Manager. For instance, when I launch Synaptic while there's an active Dolphin window, Global Menu still displays its menu when the active window is Synaptic. However, Window Title applet doesn't do that, e.g. it replaces Dolphin with Synaptic Package Manager, while the menu following this title is from Dolphin window behind the active Synaptic app window.

SOFTWARE/OS VERSIONS
Operating System: Debian Testing
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
Comment 1 Nate Graham 2023-08-28 20:45:27 UTC
When it's in this state, is another app active? Or is Plasma itself active?
Comment 2 Sadi 2023-08-29 07:52:56 UTC
(In reply to Nate Graham from comment #1)
> When it's in this state, is another app active? Or is Plasma itself active?

Case 1: AFAIK it happens only during login when Elisa starts from an autostart script that merely launches the app, waits 2 seconds, and then executes:
xdotool windowminimize `xdotool getactivewindow`
At this time there's no active app window, although there are some other apps minimized or closed to system tray (unfortunately Elisa doesn't have these features ; -)
Naturally, it doesn't happen when Elisa minimized resulting in another open app window automatically takes over the active state.

Case 2: It happens when there is another app window open. Apparently, Global Menu applet either doesn't realize that Synaptic is the new active app window, or wrongly decides to keep the previous active app menu because it can't get  any menu information from Synaptic.
Comment 3 Sadi 2023-08-29 07:55:23 UTC
Created attachment 161255 [details]
Global Menu still showing Elisa menu after it's minimized while Window Title area becomes blank
Comment 4 Sadi 2023-08-29 08:05:54 UTC
Created attachment 161256 [details]
Window Title displaying Elisa only when its window is active
Comment 5 Nate Graham 2023-08-29 19:24:23 UTC
How strange. Thanks.
Comment 6 Sadi 2023-09-14 07:34:42 UTC
I've just noticed that MacOS 13 (Ventura) oddly has the same problem, too - if this means anything. ;-)
Comment 7 Sadi 2023-09-14 07:36:06 UTC
Created attachment 161620 [details]
MacOS Ventura with the same orphan menu problem