Hofknecht / SystemTrayMenu

SystemTrayMenu - Browse and open your files easily
http://hofknecht.eu/systemtraymenu/
GNU General Public License v3.0
657 stars 45 forks source link

[BUG] SystemTraymenu opens by itself #505

Open dieg467 opened 1 year ago

dieg467 commented 1 year ago

Hello, I am using this very useful application. I write because I have a clipboard app (CopyQ) installed on the taskbar. Every time I right click on it, exiting the Copy Q popup opens the SystemTrayMenu that I added to the taskbar. In Settings I have the "Show in the taskbar" option checked. I've read that unchecking this option fixes the problem, but I like having the SystemTrayMenu menu along with other shortcuts on the Windows 10 taskbar, away from the notification area. Is there a plan to solve this problem? Thank you.

topeterk commented 1 year ago

Can you describe more waht CopyQ does with the taskbar or how it interacts with STM? I'm not excatly sure what happens here, maybe CopyQ returns focus on the next/last running application of the taskbar? STM will open the menu wenn the application becomes focus, so maybe reordering the active applications might change the behavior?

Hofknecht commented 1 year ago

i also assume the focus returns to STM and this automatically opens it. If so, there is no workaround or no solution, except as mentioned to disable "Show in the taskbar"

dieg467 commented 1 year ago

Hello. SystemTrayMenu opens only when using CopyQ, but also, sometimes it opens only when minimizing a window to show the desktop. It can be any application window or file explorer. The STM icon is always active on the taskbar and has the underline showing the image, all the time. image I understand that this underlining is for open applications. Is it correct that this underline is in STM? Thank you.

Hofknecht commented 1 year ago

We understand using CopyQ the focus often returns to STM which causes STM to open (when 'Show in Taskbar' true). Also minimizing a app, causing switch of focus.

and clarify the thing with the underlining:

image

Underline in the Taskbar:

Many programs display a small horizontal line underneath their icon in the taskbar to indicate that they are open or active. This line is usually blue.

Gray Background when in Focus:

When you click on the icon of an open program in the taskbar, the program becomes active and gains focus. In this state, the program's icon typically appears with a gray background. This helps distinguish the active program from others that are open but not currently in focus. So, if you see a program in the taskbar with a blue line under it, it means the program is open. When you click on it, and it turns gray, it's in focus and ready to accept your input.

=> When you minimize an app in Windows, often another app gets focus to allow seamless switching between applications, optimizing resource usage and user experience.

=> We've tried to mimic the focus behavior of the Windows Start menu. The Start menu is unique in that it doesn't simply return focus when you click on it again to close it. An application, however, cannot be minimized while retaining focus; it automatically relinquishes focus. That's why we've created a taskbar-like form that resides off-screen, to which we transfer focus. So, when a program passes focus to us, the Menu will open.

Not sure if there is an other better solution.

Hofknecht commented 1 year ago

@dieg467 as workaround try pressing 'Win + D' (minimizing all, forces taskbar to get focus) before using CopyQ. Does this help? often a windows power user has many programms open, also normally if a second app is open the issue should not occure often. Does it help if e.g. windows explorer open 'Win + E' before using CopyQ?

dieg467 commented 1 year ago

Hello, thank you for your detailed response. Since I have no programming knowledge, I don't understand why STM takes focus when other windows are minimized. I see the same behavior here as with CopyQ, that is, when the CopyQ popup window is closed and when a window is minimized or closed. In both cases, STM takes the focus and opens up.

Hofknecht commented 1 year ago

https://github.com/Hofknecht/SystemTrayMenu/issues/474 https://github.com/Hofknecht/SystemTrayMenu/issues/452 https://github.com/Hofknecht/SystemTrayMenu/issues/505 seems to be related

MichiFr commented 1 year ago

I do see the same behavior on Windows 11.

So far I can reproduce this e.g. when opening the Windows Settings and immediately leaving the window when clicking on the close button or sy imply minimizing the settings.

Now SystemTrayMenu opens itself automatically from the tray menu and I've to click on an empty space on desktop for ST to close automatically. The same happen if I open e.g. Directory Opus and closing or minimizing the main window the same way as mentioned above. Other program behave similar.

The icon of SystemTraymenu is visible all time in task tray and not hidden as other icons.

Some screenshots of ST: 2023-10-05_104334

lbdyck commented 8 months ago

I am seeing this same behavior on windows 11 pro frequently