Spotify Minimize To Tray

Spotify Minimize To Tray

Restore minimized to tray windows to their previous positions after sleep/desktop unlock.

3 discussion posts
Hi. I'm using 2 displayport monitors so my windows move from one monitor to another after resuming from sleep/Unlocking desktop.
I stumbled upon these 2 guides https://www.displayfusion.com/Discussions/View/automatically-save-and-restore-window-positions-on-sleepresume/?ID=fa98975e-e4ed-45de-afe0-fafad56c7a83#first and https://www.displayfusion.com/Discussions/View/restoring-windows-to-appropriate-screens-when-docking/?ID=87111264-3633-444a-9cc9-78093bceedab
and used them to create triggers to circumvent this behavior:
1. I saved monitor profile.
2. I set system idle trigger to save windows 5 seconds before monitors going to sleep (1755 seconds)
3. I set windows to restore to previosly saved position based on monitor profile change (because when displayport monitor goes to sleep after 1-2 minutes it's effectively goes off and monitor profile changes in windows and when it's waked profile changes back and DF detects it as previously saved)
4. I also set trigger to save windows positions on desktop lock and restore them when desktop is unlocked.
Triggers above cause any opened windows to restore their positions perfectly. However there's apps like Discord, Spotify or HWInfo. These apps are closed to tray. And upon clicking on tray icon they're restored to wrong monitor.
I tried to create triggers for these specific apps and was succesfull to some degree.
Window created trigger don't work but window focused trigger works but not 100% of times probably because all windows cannot be focused by default.
So I'm looking for a way to focus these windows when I open them from double clicking tray icons and applying triggers after that. Or any other solution to restore positions of windows minimized to tray (their default behavior not DF minimize to tray function) after sleep/desktop unlock.
Owen Muhlethaler (BFS)
Hello,
When you created the window focused trigger, did you create a trigger for each of the apps your opening from the tray?
Thanks!
Sunlighthell
Quote:
Hello,
When you created the window focused trigger, did you create a trigger for each of the apps your opening from the tray?
Thanks!

Hi.
Yes I created profile for all apps I need. I guess it is how these apps are programmed. Because on other hand I have iCue and MSI Afterburner apps. They remember their positions no matter what (sleep/closed to tray without any DF triggers/functions).
Also I noticed that when youtube is in fullscreen and video is paused (I use firefox browser) save windows position function on system idle is not working but windows 10 idle timer is working resulting in monitors going to sleep without saving windows positions.
Owen Muhlethaler (BFS)
Hello,
Could you try setting the window text match condition for the programs that aren't working? For example, try setting the window text to 'discord' and see how that works.
That's interesting with firefox. Does this happen with any other applications when they go full screen?
Thanks!
Sunlighthell
Quote:
Hello,
Could you try setting the window text match condition for the programs that aren't working? For example, try setting the window text to 'discord' and see how that works.
That's interesting with firefox. Does this happen with any other applications when they go full screen?
Thanks!

Hi! Unfortunately this is not an option because discord change window name depending on text channel/voice channel I last used. It moves to correct position once I click taskbar and then click on discord window. If I could auto focus windows with certain condition that would be great.
And youtube fullscreen. It seem this is windows 10 'feature'. After some googling I found records that you can disable this behavior using regedit or group polisies but have not tried yet and doubt I will.
Owen Muhlethaler (BFS)
Hello,
Unfortunately I don't think there's much we can do here. The windows positions function won't restore windows that aren't visible, and the window focused trigger doesn't always fire when a program is restored from the tray, it depends on how that program is hidden.
Sorry I couldn't be of more help!
Was this helpful?
  • I would like to minimize my app to the tray when the user presses close, similar to how Spotify operates. It doesn't have to a Windows system tray, but I do want my window to be closed. However, the scripts in the webpage should be running so that a close behaves similarly to a minimize without a window.
  • So, this happened when I was playing games on steam. The game crashed and now my Steam is stuck minimized along with other randoms things, like I cant even open folders, well they open up but you can't see them I go to my taskbar to click and try to maximize them but it won't do anything.

How To Minimize Screen In Windows 10

Spotify minimize to traySpotify Minimize To Tray

Spotify Minimize To Tray

TrayMinimize

Show Minimized Windows

On Windows for example what if you want a tray icon but want the Close button to actually close rather than collapse to tray, clicking on the tray icon would minimize to tray. On Mac the option should say Minimize to Dock, unchecking it makes X actually close the app fully. As shown in Spotify, disabling minimize to tray does not get rid of the.