Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • November 22, 2017, 08:57 AM
  • Proudly celebrating 10 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 3739 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 37,613
    • 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: 932
    • 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: 37,613
    • 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: 37,613
    • 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: 10,899
    • View Profile
    • Donate to Member
3rd day in a row, working perfectly.



 ;D party time :-*
Tom

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 37,613
    • 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.