benbuck / rbtray

A fork of RBTray from http://sourceforge.net/p/rbtray/code/.
GNU General Public License v2.0
1.05k stars 86 forks source link

Feature Req: Minimize window prior to hiding #72

Open coderb opened 2 years ago

coderb commented 2 years ago

When using google earth if you click on a "waypoint" it may display a small popup window (child).

It turns out that when using rbtray if you minimize to tray, this popup remains displayed.

However, when you do a normal minimize of google earth the popup is hidden.

Perhaps rbtray should do a normal minimize of the window prior to hiding it and adding the tray icon so that the application gets a chance to handle the minimize windows event and do what it needs.

I've attached some screenshots to illustrate: cap1 cap2

dreamforceinc commented 2 years ago

It's already there

coderb commented 2 years ago

hi @dreamforceinc - ShowWindows(SW_HIDE) makes the window invisible (eg no taskbar entry). I believe a call to ShowWindow(SW_MINIMIZE) prior to the hide would solve my issue (and a corresponding call to ShowWindow(SW_RESTORE) when untraying. thanks.

dreamforceinc commented 2 years ago

@coderb

I believe a call to ShowWindow(SW_MINIMIZE) prior to the hide would solve my issue

Yes, you are right. It works for me, but it have a some unwanted "effects" for some windows. ))) Total Commander now have a two icons in tray after hiding by rbtray. This happens when the option 'Move icon to system tray when minimized' is enabled. Need to think about it.

coderb commented 2 years ago

@dreamforceinc hi- for total commander shouldn't you just unselect the option in total command to minimize to tray? alternatively, rbtray could check to see if the window is still visible after the minimize and not move to the tray if so (this is probably the most functional solution).

if there is any way i can help to get this issue addressed/merged please let me know. it is a constant source of annoyance for what is otherwise an outstanding utility.

thanks.

benbuck commented 2 years ago

Hi @dreamforceinc and @coderb,

I just responded to pull request #77 by @dreamforceinc.

Thanks, Benbuck

dreamforceinc commented 2 years ago

if there is any way i can help to get this issue addressed/merged please let me know. it is a constant source of annoyance for what is otherwise an outstanding utility.

Hi @coderb ! Feel free to add your own solution.