Dialogs do not remember maximized state after minimizing

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
krisz
Junior Member
Junior Member
Posts: 3
Joined: 2018-05-08, 17:18 UTC

Dialogs do not remember maximized state after minimizing

Post by *krisz »

Steps to reproduce:
1) Open a dialog like Search, Multi-Rename Tool, Synchronize directories or plugin configuration dialogs
2) Maximize window
3) Minimize window
4) Click Total Commander in the taskbar
5) Window is not maximized
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Confirmed, but only for 32bit version of TC.

It is the same way back to TC 8.52a (32bit)

Testet under Windows 7 and 10.
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
krisz
Junior Member
Junior Member
Posts: 3
Joined: 2018-05-08, 17:18 UTC

Post by *krisz »

I tried the 32 bit version and it's the opposite for me, it works in 32 bit version but not in 64 bit version.

I'm using Windows 10 1803 64bit.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I tried the 32 bit version and it's the opposite for me
You are right I overlooked the "not" in your item 5)

So to clarify what I see: When using 32bit TC the window is (still) maximized when clicking Total Commander in the taskbar and in 64bit TC it is set back to normal size.
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: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I can reproduce it, but I couldn't find out why it is happening. But I found a solution: I simply remember the maximized state when minimizing the window. And when it gets restored, I check whether it was maximized, and maximize it myself if it wasn't. It's ugly, but it works.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in beta 5 64-bit, please test it! Please let me know if I missed any dialogs.

Btw, I had to disable the minimize button in two cases where restoring to maximized didn't work:
1. Search -> maximize -> click on "drives"
2. Multi-rename tool > maximize -> click on "[=?] Plugin"
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

So far testet in Search, Multi-Rename Tool, Synchronize directories and plugin configuration dialogs - which are all fixed in TC 9.20b5 :-)
Last edited by petermad on 2018-05-31, 22:56 UTC, edited 1 time in total.
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
krisz
Junior Member
Junior Member
Posts: 3
Joined: 2018-05-08, 17:18 UTC

Post by *krisz »

I just found out that the issue is also present for docked windows (to the side or corner) in both 32bit and 64bit.

I tried in Lazarus and it turns out it only works for the root window. It should probably be fixed in Lazarus itself. I don't know how much control you have, maybe you could override the minimize and restore handlers and add these features manually, that might also allow to better implement the restoration because it's ugly as it's visible it's resizing the window to fullscreen.

If you plan to fix this manually note that docked windows can also be resized and that doesn't mean they are restored, e.g. if you move the docked window or maximize then restore, it will use properties from restored state before docking.

It would be also nice if the dialogs could be minimized by clicking on the app in the taskbar, it should work like that for any minimizable window.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I cannot fix it for docked windows, because there is no Windows command to set a window to a docked state.

And I don't think it's a Lazarus problem. I couldn't find any code which would restore the position of the window. It seems to be a weird Windows bug.
Author of Total Commander
https://www.ghisler.com
Post Reply