solved [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Bug reports will be moved here when the described bug has been fixed

Moderators: petermad, Stefan2, Hacker

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

solved [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *petermad »

To reproduce:

In the [Lister] section of wincmd.ini set this parameter and restart TC:

Code: Select all

dx=464
Now, each time Lister is opened and "Options" -> "Save position" is executed (without changing the size of the window first) and Lister is closed again, the height of the lister window is decreased by 21 pixels (dy value).

This also applies to the QuickDx= parameter (Quick View in separate window)

Video: https://tcmd.madsenworld.dk/listerwidth464.mp4

Can be reproduced with a clean ini file.

Only the 64bit version is affected. Tested under Windows 7 and 10.

The bug occurs the first time in TC 9.10b1 x64


Maybe caused by this fix?:
history.txt wrote:05.09.17 Fixed: Lister: Switching between text and binary mode could change the Lister size (if one mode had a horizontal scrollbar and one not) (64)
License #524 1994
Danish TC Translator
TC 11.58 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1416b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53145
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *ghisler(Author) »

Delphi and Lazarus measure the window dimensions differently - Delphi includes the borders, Lazarus does not. It's strange that you get this now, Total Commander should compensate for this difference.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 17380
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *petermad »

2ghisler(Author)
It is not about a size difference between 32bit and 64bit TC, it is about the [Lister] dy parameter being changed each time the "Options" -> "Save position" is executed - even without having changed the window size or position - and this only happens when the dx parameter is less than 465.

Please watch the video I provided in my first post - that may help you understand the problem - it shows how the height of the Lister window gets smaller and smaller each time I click "Options" -> "Save position" and reopen Lister.
License #524 1994
Danish TC Translator
TC 11.58 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1416b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53145
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *ghisler(Author) »

That's clear, "Save position" needs to add the border when saving with the 64-bit version, and loading the position needs to subtract it.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 17380
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *petermad »

2ghisler(Author)
But still - why does this only happen when the value of dx is below 465?

I noticed this issue because I wanted to make a narrow separate QuickView Lister window next to the main TC window, in the same height as the TC window, and that was impossible, because the Lister window got smaller the next time I opened it. I then tested the regular Lister window, and it had the same problem as the separate QuickView Lister window.

I am a little uncertain about your answer - do you recognize the problem, and are you going to try and fix it?

Also my windows borders are 6 pixels and my title-bar is 21 pixels - it seems more like it is the title-bar dimension that has to be accounted for.

I tested in Windows 7, where it is easy set set the border width and the height of the title bar, and it did not make any difference - it is always 21 pixels, that the window gets smaller with each "Save position" - it does not change with different Windows settings for border width nor title-bar height.
License #524 1994
Danish TC Translator
TC 11.58 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1416b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53145
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *ghisler(Author) »

I don't see any such limit in my code. I'm calling GetWindowPlacement to get the current position and size.
Please note that GetWindowPlacement cannot return the position and size of windows which were snapped to a border or edge of the screen. It always returns the coordinates before the window was snapped there.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 2184
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *AntonyD »

#146217 personal license
User avatar
petermad
Power Member
Power Member
Posts: 17380
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *petermad »

2ghisler(Author)

My Lister window was never snapped to a border or the edge of the screen - as the video https://tcmd.madsenworld.dk/listerwidth464.mp4 also shows.

The video if from Windows 7, but I can reproduce it 100% under windows 10 too.
License #524 1994
Danish TC Translator
TC 11.58 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1416b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
AntonyD
Power Member
Power Member
Posts: 2184
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *AntonyD »

btw me too. win 10 && 11.
BUT!!! only from 445 px and by 19 px each time!
#146217 personal license
User avatar
petermad
Power Member
Power Member
Posts: 17380
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *petermad »

BUT!!! only from 445 px and by 19 px each time!

Interesting - I suggest that Ghisler tests with a dx value of 400 then.
License #524 1994
Danish TC Translator
TC 11.58 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1416b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53145
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *ghisler(Author) »

The problem seems to be the Lister menu: Here it happens when the menu becomes 2 lines high. Can you reproduce that?
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 17380
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *petermad »

2ghisler(Author)

It happens too, when the menu is 2 lines high, but as you can see from https://tcmd.madsenworld.dk/listerwidth464.mp4 it also happens when it is 1 line high.
License #524 1994
Danish TC Translator
TC 11.58 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1416b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
AntonyD
Power Member
Power Member
Posts: 2184
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *AntonyD »

single line.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53145
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *ghisler(Author) »

This should be fixed in Total Commander 11.57 beta 1, please check it!
12.10.25 Fixed: Lister: Do not change height of window when changing width and menu goes from 1 to 2 lines (64)
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 17380
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.56 x64] Lister height set incorrectly when the width is below 465 pixels

Post by *petermad »

Confirmed fixed in TC 11.57b1 :-)

BUT the description of the fix does not match the original description of the bug. In the bug description the width of the window was not changed, and a 2 line menu was not seen. It was simply the fact that with a narrow Lister window, just saving the window position (without having moved or resized the window) caused a decrease of the window height, which was seen the next time Lister was opened.
License #524 1994
Danish TC Translator
TC 11.58 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1416b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply