kangyu-california / PersistentWindows

fork of http://www.ninjacrab.com/persistent-windows/ with windows 10 update

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

System tray minimized windows are not stored/restored

Templayer opened this issue · comments

Hi! A great piece of software! And something that should have been a part of Windows itself by default!

You know what else should have been a part of Windows by default but isn't? Being able to minimize any window into the system tray.

For that, I am using another third-party utility. The somewhat niche problem here is that these two third-party applications do not work together.

The utility is called RBTray. I forgot which version, I had it installed since about 2017. Probably not the newer github fork.

It enables me to minimize any window into the system tray by RIGHT-clicking the standard minimize button.

Incredibly useful to declutter stuff.

Currently, I'm using it for four things: A command line (a bat file), a server application, Internet Lock and Fling (Fling has its own way to be minimized into the system tray, but its background tasks are stealing focus unless I use this third-party utility instead).

EDIT: This also occurs for applications that do not need RBTray, like qbittorrent!!!

image

It's something I cannot live without. :p

Now - steps to reproduce the problem:

  1. We have an application we want to put into the system tray - it is currently at the size we want it to stay as:

image

  1. We minimalize it to the system tray:

image

  1. Now we just have to disconnect a DisplayPort monitor without any other screen being present, thus making every window tiny. Other windows are restored to their original glorious size by PersistentWindows. But the system tray ones, however, are not. Deminimalizing it by clicking on it on the system tray yields this result:

image

Strange. After restarting the computer (and eventually unplugging and replugging a DisplayPort monitor), now it kinda works - upon being deminimized from the system tray, qbittorrent (i.e. not using RBTray), a CMD window and a server application all flicker in the low resolution and then their resolution is restored to how it was before the DisplayPort monitor was turned off, as it should be.

image

Now a question stands - why didn't it work at first?

Welp, spoke too soon. Because Fling, on the other hand, did not get restored:

image

Welp, spoke too soon. Because Fling, on the other hand, did not get restored:

image

Hmm, maybe Fling WAS restored to what has been stored before, and I just forgot to adjust the window after the next-to-last DisplayPort replugging. Welp, NOPE, checked the logs and no Fling restoration in sight.

AND it looks like my normally minimized Explorer windows didn't get restored either. Which is a bummer, since that is the main reason why I got this application:

image

FlingDidn'tGetRestoredAndNeitherDidExplorerWindows.zip

Notepads failed to be autorestored as well. From being minimized normally, not into a system tray (i.e. this should be a standalone issue, but maybe the source problem is the same)

image

Please try https://github.com/kangyu-california/PersistentWindows/releases/tag/5.49_patch

Haven't tried it yet, but I did tests twice more each morning after turning on a DisplayPort screen.

Yesterday, all of my RBTray system tray minimized applications restored fine, but qbittorrent didn't - then I misclicked on it again in the tŕay, thus minimalizing it back to the system tray. Clicking on it a third time produced a window with a restored size!

Today, everything in the system tray got restored properly, except for Fling.

Also, before those tests, I tested if failure to restore a window will fix itself in time. It didn't, the windows stayed tiny for hours.

The issue is rbtray minimize/unminimize operation failed to trigger event required for PW.
here is the fix.
image
Please download the fixed rbtray version from
https://github.com/kangyu-california/rbtray/tree/main/x64

The issue is rbtray minimize/unminimize operation failed to trigger event required for PW. here is the fix. image Please download the fixed rbtray version from https://github.com/kangyu-california/rbtray/tree/main/x64

Well, that failed spectacularly (on their end, not ours... I hope): benbuck/rbtray#112

The feature to "minimize window to system tray" is now available in PW.
Just click the minimize button of the window while holding Ctrl key.

Please try the latest patch2 from https://github.com/kangyu-california/PersistentWindows/releases/tag/5.49_patch

New patch release with improved reliability to ctrl minimize window to notification tray
https://github.com/kangyu-california/PersistentWindows/releases/tag/5.50_patch