ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Desperate app request - restore window positions after wake from sleep scrambles

(1/13) > >>

mouser:
This thread describes a problem that quite a few people seem to be suffering from, where window positions get scrambled on multi-monitor setups when the monitors wake up from sleep:
https://www.donationcoder.com/forum/index.php?topic=37307.msg407109#msg407109

It doesn't happen and I think it's some side effect of some monitors not waking up fast enough.

The app will have to do the following:
1. Periodically store the positions of all windows on screen.
2. Detect when the monitors wake up from sleep.
3. After some delay after waking up, automatically restore the window positions (including maximization state, etc.)
4. I'm guessing it will need some way of allowing user to exclude certain apps from processing (i'm guessing some apps might misbehave or have hidden windows that shouldn't be processed, etc.)

Lintalist:
Haven't tried it but here is a "AutoHotkey script that will save your window positions and then restore them to the saved position" https://github.com/KroniK907/WindowSaver

I'm assuming it has to be slightly modified to say safe window positions every X minutes - there is a wrapper for power events here https://autohotkey.com/board/topic/36718-wrapper-to-catch-power-management-events-like-standby/ which may proof useful if you want it fully automated. Otherwise adding a hotkey to "restore" the latest state quickly after a sleep is probably easier :)

mouser:
Nice find, Lintalist.
That looks like it's 95% of the solution.
Now if I can just get one of the ahk coders here to add the other 5% I'll be golden.  :up:

app103:
Now if I can just get one of the ahk coders here to add the other 5% I'll be golden.
-mouser (April 14, 2017, 09:50 AM)
--- End quote ---

Would this work for about 2.5%?

https://www.donationcoder.com/forum/index.php?topic=4960.msg34720#msg34720

In other words, launching the AHK script after a set length of user idle time, but a shorter than when your monitors would go to sleep (almost like a screensaver)?

Then all you'd need is something to run it to restore, after a set length of time after user activity is detected, just slightly longer than it takes for your monitors to fully wake up.

This does what you need: https://www.donationcoder.com/forum/index.php?topic=4960.msg34720#msg34720

Can be used to set the timeout to run the ahk script after a set length of user idle time, and then run to restore the windows after keyboard/mouse activity detected. It does both, so now you have your 100%. :)

mouser:
I'm not sure.. I think still missing is something that restores window positions only after the monitors wake up from sleep, and then after some delay..

And the procedure for saving window positions -- since it's going to be happening so frequently, it would be nice if it was all one process rather than something launching another exe every 30 seconds..

Navigation

[0] Message Index

[#] Next page

Go to full version