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

<< < (8/13) > >>

mouser:
One nice refinement to the tool might be if the load process checked if the monitors were back in the same position they were in when settings were saved, and if not, waited another X MS and tried again, up to some max time.
That would eliminate the need to set a long delay waiting for the monitors to come back online and be available, and would let you start trying to restore the layout right away, and it would also avoid trying to restore a layout if the windows would be put offscreen.  Just checking total workspace x,y,w,h for a match with saved settings would be fine -- no need to iterate all the monitors..

mouser:
I have code added now to check virtual screen (desktop) configuration and skip restoring unless it matches, but in initial tests it's not quite clear that this is going to work.. the thing i don't know is if the OS reports a different screen size when this weird OS wakeup moving windows behavior happens.. Stay tuned.

mouser:
I have code added now to check virtual screen (desktop) configuration and skip restoring unless it matches, but in initial tests it's not quite clear that this is going to work.. the thing i don't know is if the OS reports a different screen size when this weird OS wakeup moving windows behavior happens.. Stay tuned.

mouser:
I'm uploading a new version which has some options at top of file regarding delays and methods.
I think my new code to quickly cycle until the screen resolution is back to where it was, may not be all that useful because I suspect that the virtual screen size does *not* change when the weird window moving event happens.

So I wrote some new code that basically run the window position restore(load) function TWICE:
First as soon as it gets the signal that a monitor has turned on.
Second, after some delay after a monitor turns on.

The idea being that most of the time the first method works, which makes it so that you don't even notice the fix.
But sometimes this fast restore does not work and windows moves things around after it triggers.  So the second call is a kind of backup restore that will kick in if first one was too quick to take effect.

AndyD:
Hi mouser,

I have signed up purely to say a massive thank you to you and everyone else who has contributed to this project. I too faced so many issues with windows and screen positions and i have been trying to come up with a solution and stumbled across this.

I have downloaded the latest version you have compiled which works great, no problems at all so far for me.

So again, many thanks and keep up the good work, i will be following closely and report back with any issues should that help.

Kind regards

Andrew

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version