Process Hacker Discussion Forum

 
User avatar
LonelyPixel
Member
Posts: 77
Joined: 10 Nov 2011 21:46
OS: Windows 10 x64
Contact:

Tray icon should show or activate window

12 Jul 2012 08:50

The tray icon currently works like this: If the PH window is visible, the icon click hides it. If the window is hidden, the icon click shows it. That's pretty simple.

When the window is visible but completely covered by other windows, it is easy to forget about the PH window being visible and you click on the tray icon to bring it up. But now, the first time nothing happens because the visible but covered window is now hidden. Only the second click shows and activates the window.

I'm not sure whether Process Explorer does that, but I think I've seen it on other applications already: If the window was not previously active, it shall be activated (and shown if it was hidden). Only if the window was active, it shall be hidden.

Implementation details: I know that clicking the taskbar steals focus from the application window, so you cannot evaluate the active state in the moment of the click event. I think it could be best to remember the time of last deactivation of the window and compare it with the tray icon click event (or maybe better: tray icon mouse down event, because a click can last longer). If that time is shorter than say 100 ms, consider the application window active at the click time. This should only apply if the window is also currently visible.
 
User avatar
dmex
Admin
Posts: 1695
Joined: 17 Jan 2011 05:43

Re: Tray icon should show or activate window

12 Jul 2012 09:28

LonelyPixel wrote:
When the window is visible but completely covered by other windows, it is easy to forget about the PH window being visible and you click on the tray icon to bring it up. But now, the first time nothing happens because the visible but covered window is now hidden. Only the second click shows and activates the window.
As a work-around you can just right-click the tray-icon to bring up the context-menu, this will also activate the main window (bring to the foreground) if it's hidden by another application.

Is it just the double left click that needs some attention?
 
User avatar
LonelyPixel
Member
Posts: 77
Joined: 10 Nov 2011 21:46
OS: Windows 10 x64
Contact:

Re: Tray icon should show or activate window

12 Jul 2012 09:53

I didn't refer to any double click. I meant clicking twice, with sufficient time in between. (It takes a little moment until I realise that the PH window won't show up anymore, so I click the second time. This is actually my default behaviour: If anything doesn't react, quickly try a second time and only then go search for the cause. This catches the situation with PH nicely...) I have enabled the option "Single-click tray icons".

While the right-click also activates the window (which I didn't know nor was I expecting this), there's also an "unwanted side effect" of the context menu to open. A second action may be necessary to close that.
 
kunom
New User
Posts: 1
Joined: 15 Aug 2012 19:08

Re: Tray icon should show or activate window

15 Aug 2012 19:14

That's exactly what I wanted to report right now, because I constantly end up repeating the double clicks on the tray icon.

My proposal:
On double-clicking the tray icon ...
- if Process Hacker window is minimized/hidden: show the window
- if the window is visible, but does not have the keyboard focus: bring it to front, activate it
- if the window is visible and has keyboard focus: hide the window
 
rutsky
Member
Posts: 4
Joined: 30 May 2014 09:34

Re: Tray icon should show or activate window

30 May 2014 09:40

+1 for this feature as described by kunom.
 
User avatar
dmex
Admin
Posts: 1695
Joined: 17 Jan 2011 05:43

Re: Tray icon should show or activate window

30 Mar 2021 23:23

This feature was added to recent nightly builds :thumbup:
 
User avatar
LonelyPixel
Member
Posts: 77
Joined: 10 Nov 2011 21:46
OS: Windows 10 x64
Contact:

Re: Tray icon should show or activate window

03 Apr 2021 08:51

Thank you. Will there be a new release some day or are those nightly builds the new recommendation for everybody?