Save position not working if window was stretched to current position.

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
scarystuff@gmail.com
Junior Member
Junior Member
Posts: 4
Joined: 2021-08-16, 11:31 UTC

Save position not working if window was stretched to current position.

Post by *scarystuff@gmail.com »

If i drag the top of TC window to the top of my desktop, so it stretch the window from top to bottom on my desktop and then use the Save Position option in TC, it will not remember that position next time I restart it.

Might be a Windows bug since I see it happen with other programs like Discord.
User avatar
Stefan2
Power Member
Power Member
Posts: 4124
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Save position not working if window was stretched to current position.

Post by *Stefan2 »

Hi and welcome. Thank you for the report.

scarystuff@gmail.com wrote: 2021-08-16, 11:37 UTC Might be a Windows bug

Which TC / Windows version?
32/64 bit?
Could you please try it with the other TC bit-version too? (no need to install, only unpack the *.exe from the archive and copy it to the TC-folder)





 
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Save position not working if window was stretched to current position.

Post by *petermad »

2scarystuff@gmail.com
I think it happen when you use Windows' snap-to-side function, where the window automatically expand and snap to the edge of the screen when you drag the window border (or the window itself) fast to the edge of the screen.

See: https://www.ghisler.ch/board/viewtopic.php?p=395699#p395699

Does it happen if you slowly drak the window border to the edge of the screen or if you just drrag it near the edge
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
scarystuff@gmail.com
Junior Member
Junior Member
Posts: 4
Joined: 2021-08-16, 11:31 UTC

Re: Save position not working if window was stretched to current position.

Post by *scarystuff@gmail.com »

Stefan2 wrote: 2021-08-16, 12:48 UTC Hi and welcome. Thank you for the report.

scarystuff@gmail.com wrote: 2021-08-16, 11:37 UTC Might be a Windows bug

Which TC / Windows version?
32/64 bit?
Could you please try it with the other TC bit-version too? (no need to install, only unpack the *.exe from the archive and copy it to the TC-folder)





 
Happened with TC 9.x and now also with TC 10.x, 64 bit.
Windows 10 64 bit with all updates.
scarystuff@gmail.com
Junior Member
Junior Member
Posts: 4
Joined: 2021-08-16, 11:31 UTC

Re: Save position not working if window was stretched to current position.

Post by *scarystuff@gmail.com »

petermad wrote: 2021-08-16, 14:09 UTC 2scarystuff@gmail.com
I think it happen when you use Windows' snap-to-side function, where the window automatically expand and snap to the edge of the screen when you drag the window border (or the window itself) fast to the edge of the screen.

See: https://www.ghisler.ch/board/viewtopic.php?p=395699#p395699

Does it happen if you slowly drak the window border to the edge of the screen or if you just drrag it near the edge
If I drag the window to the position I want, without it using Windows snap function and then save the position, it will remember it. But placing the window with the snap function and saving position, it will not remember that new position.

I am leaning towards a Windows bug, since it also happens with MS Edge window, I have noticed.
scarystuff@gmail.com
Junior Member
Junior Member
Posts: 4
Joined: 2021-08-16, 11:31 UTC

Re: Save position not working if window was stretched to current position.

Post by *scarystuff@gmail.com »

Turning Windows Snap function off will of course fix the problem since I then have to manually line the TC window up pixel perfect and Save position then works, just like if I carefully line the window up with Snap on, but without activating the snap feature.

I don't know if Windows is then not reporting the correct window size back to programs after using Snap or what else might be happening..
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Save position not working if window was stretched to current position.

Post by *petermad »

2scarystuff@gmail.com
I don't know if Windows is then not reporting the correct window size back to programs after using Snap or what else might be happening..
According to Ghislers answer here https://www.ghisler.ch/board/viewtopic.php?p=395699#p395699 it is because Windows reports the previous coordinates when snapping - so a kind of a Windows bug or fallacy.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Save position not working if window was stretched to current position.

Post by *ghisler(Author) »

There are hacks to restore the AeroSnap position, like getting the actual size via GetWindowRect:
https://stackoverflow.com/questions/8368540/save-and-restore-aero-snap-position-on-windows-7
But even then it doesn't work when you try to un-snap the window - it will not restore the previous position because you can't tell windows that the window is meant to be in snapped position.
Author of Total Commander
https://www.ghisler.com
Post Reply