topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • August 21, 2018, 09:30 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Desperate app request - restore window positions after wake from sleep scrambles  (Read 9135 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,797
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
I am absolutely giddy to have a fix for my window scrambling problem..  :-* :-* :-* :-* :-*

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
No, Sleep puts the monitor to sleep, as requested. :) I've also added command line options
-load <filename> -save <filename> -sleep -help -exit

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,797
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
I've also added command line options
-load <filename> -save <filename> -sleep -help -exit

Nice!!

Maybe the menu should say "Put monitors to sleep" then, not just "sleep".

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,797
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
3rd day in a row, working perfectly.


tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,292
    • View Profile
    • Donate to Member
3rd day in a row, working perfectly.



 ;D party time :-*
Tom

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,797
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Had my first semi-failure with WinPosSaver, BUT I could see exactly why it went wrong.  The monitors took a LOOOONG time to wake up, and even my "backup" window position loader that triggers after 2 seconds was too soon, and the OS did it's scrambling after..

So the solution is probably to tweak the code so that it runs not just a single "backup" restore of positions, but maybe a series of them (100ms, 1s, 2s,3s,4s)... There isn't much harm in restoring windows positions several seconds after wake up.. Though it might be nice if we could reliably find a way to detect when the human was actually starting to work at the pc or when windows had scrambled stuff and only do it then, just in the off chance that a human tries to move windows around in the few seconds after the monitors wake up and you didn't want to undo that.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,797
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
A follow up to this -- after having an opportunity to swap out my main monitor, I can confirm that the weird windows repositioning problem is somehow related to the specific brand of monitor that I was using (an LG brand).  Swapping that out for another monitor, regardless of the connection (hdmi, displayport), eliminated the behavior completely.  So LG is doing something wacky that is confusing MS windows.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 8,493
    • View Profile
    • The Blog of Deozaan
    • Donate to Member
Is there a nice, easy to find location to find the latest and greatest version of this?

I've been experiencing a similar issue that has started to annoy me enough to finally look for a solution. For me it happens frequently where my monitors get switched when changing Windows user accounts.  >:(

I'd like a compiled exe of whatever Skrommel was working on, if that's possible.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,797
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
I can find and upload the last version I used.. Though note that my problem went away when I stopped using my LG monitor.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 8,493
    • View Profile
    • The Blog of Deozaan
    • Donate to Member
I'd appreciate it.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,797
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Here's my latest modified version of skrommels code, including ahk and compiled to exe:
http://www.donationc...ads/WinPosSaverM.zip