TC 9.51 does not save the size and position of its window

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Vladislav Vasilyev
Junior Member
Junior Member
Posts: 4
Joined: 2017-11-27, 05:02 UTC
Location: Russia, Samara City

TC 9.51 does not save the size and position of its window

Post by *Vladislav Vasilyev »

On one of the computers with Windows Server 2012 R2 Total Commander 9.51 64-bit does not save its window size and position. In the file wincmd.ini after executing the command "Save position" the same window coordinates are always spelled out:

[1920x1080 (8x16)]
maximized=0
x=0
y=13
dx=1920
dy=876

The same problem occurs in Windows 10 when the system font scale is set to other than 100%.

However, on the other Windows Server 2012 R2 computer, the size is saved:
[1920x1080 (8x16)]
maximized=0
x=451
y=0
dx=1469
dy=1050

It is strange that in the second case dx=1469, not 1920, although the TC window is aligned with the right edge of the screen, which operates in 1920x1080 mode.

The need to re-adjust the size and position of the window after each TC start is annoying. Could you figure out why saving doesn't work and fix the bug?
Last edited by Vladislav Vasilyev on 2021-01-06, 07:56 UTC, edited 1 time in total.
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC 9.51 does not restore the size and position of its window

Post by *petermad »

Maybe you have the wincmd.ini parameter ResolutionSpecific set to zero on the first computer - then the settings are saved in the [AllResolutions] section.



It is strange that in the second case dx=1469, not 1920
dx is not the coordinate of the right corner it is the width of TC. So screen width - x = dx (1920 - 451 = 1469 ).
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
Vladislav Vasilyev
Junior Member
Junior Member
Posts: 4
Joined: 2017-11-27, 05:02 UTC
Location: Russia, Samara City

Post by *Vladislav Vasilyev »

On a computer where the size and position of the Total Commander window is not saved, the "ResolutionSpecific" parameter is absent in the wincmd.ini file, the coordinates in the [AllResolutions] section are absent. In the [1920x1080 (8x16)] section only the "maximized" and "Tabstops" parameters are saved, other coordinates always remain constant:
[1920x1080 (8x16)]
maximized=0
x=455
y=4
dx=1467
dy=800
Last edited by Vladislav Vasilyev on 2021-01-06, 07:56 UTC, edited 1 time in total.
Vladislav Vasilyev
Junior Member
Junior Member
Posts: 4
Joined: 2017-11-27, 05:02 UTC
Location: Russia, Samara City

Post by *Vladislav Vasilyev »

I wrote the previous post while connected to Windows Server 2012 R2 via RDP.
I have an idea: could it be that Total Commander behaves so strangely due to its remote desktop mode? Connected to the server console using the latest version of TeamViewer - the window coordinates were saved. Just when I was happy that my hunch was confirmed, I closed TeamViewer connection and reconnected via RDP - oh, my goodness! - window coordinates are now saved in the RDP session as well.

I don't get it! How can that be?
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re:

Post by *HolgerK »

Vladislav Vasilyev wrote: 2021-01-06, 07:53 UTC How can that be?
One possible cause is that you used the windows snapping feature (dragging the TC-window to the left/right side/edge of the screen) and than resized the TC-window while snapping to one of the screen borders was still active.
TC has some problems to get the actual window position in conjunction with window snapping.

Regards
Holger
Make our planet great again
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 9.51 does not save the size and position of its window

Post by *ghisler(Author) »

When using window snapping, the functions asking for window position (GetWindowPlacement) return the coordinates of the not snapped window, not those of the snapped window. I guess that they are the size stored in the ini file.
Author of Total Commander
https://www.ghisler.com
Vladislav Vasilyev
Junior Member
Junior Member
Posts: 4
Joined: 2017-11-27, 05:02 UTC
Location: Russia, Samara City

Re: TC 9.51 does not save the size and position of its window

Post by *Vladislav Vasilyev »

Thank you, you were right. Snap to Side was the culprit. To turn it off, open "Control Panel/All Control Panel items/Special Features/Mouse Simplification" and check "Disable automatic ordering of windows when they are moved to screen boundaries" (Russian to English translation). Or, if through the registry:

[HKEY_CURRENT_USER\Control Panel\Desktop]
"WindowArrangementActive"="0"

Problem solved!
Post Reply