Menu

#449 Bugfix for #4146: Wrong starting window position on the second monitor

Next_release
closed
nobody
None
5
2013-05-26
2013-01-23
No

Function GetWindowPlacement values are not good (there is weird discontinuity) when window is in secondary monitor and Windows taskbar is on left side of the screen. Patch uses GetWindowRect function instead and removes now unneeded offset from window position setting.

1 Attachments

Discussion

  • Don HO

    Don HO - 2013-01-27
    • status: open --> accepted
    • priority: 5 --> 6
     
  • Don HO

    Don HO - 2013-01-27

    Thank you for your patch.
    Hope it will work for every existing configuration.

    Don

     
  • Don HO

    Don HO - 2013-02-11
    • Status: accepted --> closed
    • ****: 6 --> 5
     
  • Ede_123

    Ede_123 - 2013-03-26

    Hi Pekka,

    you created patch #449
    (http://sourceforge.net/p/notepad-plus/patches/449/) for Notepad++ to
    correctly restore window size and position. First of all: It's great,
    thank you for that!

    However there's one small issue (maybe you even intended that, if not
    you're probably quite familiar with the relevant code now and your're
    maybe able to get a fix ready for this, too):
    When using aero snap the "snapped" window position (e.g. vertically
    maximized or to the left or right edge of the monitor) is remembered
    now. The "default" behavior of most applications is however to remember
    the position before using aero snap and restore the window to that size.

    I hope I was clear about the issue and - as said - it's rather minor,
    but could possibly be considered for a fix.

    Regards
    Eduard

     
  • Pekka Pöyry

    Pekka Pöyry - 2013-03-31

    Hi Eduard,

    thanks for telling me about that small issue, I didn't remember to test that case.
    My patch tried to workaround the issue with GetWindowPlacement discontinuity, but I am now starting to think that there must be some easier way to get this to work perfectly. I will try to look into this issue when I have some time.

    Pekka

     
  • Ede_123

    Ede_123 - 2013-05-24

    Any news on this Pekka?

     
  • Pekka Pöyry

    Pekka Pöyry - 2013-05-25

    I've been very busy with work and school things. This issue is still on my long todo list, but I can't say when I have time to look into it.

     
  • Ede_123

    Ede_123 - 2013-05-25

    OK, no problem. I just wanted to make sure this doesn't get forgotten, especially since I didn't file a bug report and there's only the discussion between you and me in this closed patches thread.

     
  • Pekka Pöyry

    Pekka Pöyry - 2013-05-26

    I managed to take some time off my other duties and fix this behavior. See [patches:#480]

     

    Related

    Patches: #480

  • Ede_123

    Ede_123 - 2013-05-26

    Wow, that was quick! Works perfectly, thanks. Hope you didn't neglect your other duties for it. ;)