Dual screen III: Variable size dialogs

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
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Dual screen III: Variable size dialogs

Post by *HolgerK »

Tests with TC’s variable size dialogs, using a dual screen configuration.
My configuration is:
- WinXPproSP2, TC7B1
- nVidia Desktop manager was disabled during test.
- Primary monitor 1280*768, 16”, 100dpi (placed at the right side).
- Secondary monitor 1600*1200, 20”, 100dpi (placed at the left side).
- The monitors are top aligned.
- All screenshots are resampled to 1440*600 and saved as GIF.
The desktop background is colored in unique green.
The small black rectangle at the right bottom is off screen area.
You can download the complete set of screenshots at once:
http://holgerk.drivehq.com//TC//TC7B1_DualScreenShots.zip (about 1.8M(i)Byte)


“Choose command” dialog, called from “Change single button” dialog
(I really like this dialog: Categories and filter WOW):
http://holgerk.drivehq.com//TC//TC7B1_ChooseCommand1_ok.gif

Now I moved the TC to the other screen and reopen the dialog:
http://holgerk.drivehq.com//TC//TC7B1_ChooseCommand2.gif

The expected behavior should be that the “Choose command” dialog will be opened at least on the same screen as the parent dialog.
It’s a little bit annoying in this case, if you are working focused on one monitor and a modal dialogs pops up on another monitor.
Especially because the “Choose command” dialog looks like a resizable list box.


“Find files” dialog
The first picture shows the search dialog on the primary (right) screen:
http://holgerk.drivehq.com//TC//TC7B1_Search1_ok.gif
Now I resized the “Find result” to fit the height of this monitor (1024 Pixel):
http://holgerk.drivehq.com//TC//TC7B1_Search2_ok.gif
The second time I started the search from the left (secondary) screen:
http://holgerk.drivehq.com//TC//TC7B1_Search3.gif
The same point as above: it’s a little bit annoying that the modal dialog opens on the other screen.
Now I moved the dialog to the left side:
http://holgerk.drivehq.com//TC//TC7B1_Search4_ok.gif
Resize the height to the full screen height (1200 pixel):
http://holgerk.drivehq.com//TC//TC7B1_Search5_ok.gif
Close the dialog and start another search:
http://holgerk.drivehq.com//TC//TC7B1_Search6_ok.gif
http://holgerk.drivehq.com//TC//TC7B1_Search7_bug.gif
The caption bar and upper parts of the dialog are off screen!
Close the dialog with ESC and start another search:
http://holgerk.drivehq.com//TC//TC7B1_Search8_bug.gif
The only solution in this case is to use ALT+Space and move the dialog down using the keyboard.

2ghisler(author)
To get rid of most of these small bugs, you really should consider calling ClipOrCenterRectToMonitor(pRect, MONITOR_WORKAREA) before calling MoveWindow(..) or SetWindowPos(..) for any these dialogs.

Kind regards
HolgerK
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The variable size dialogs save their position automatically where you close them. Some users may want to have them open always on another screen, so I prefer not to change that.
Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

ghisler(Author) wrote:The variable size dialogs save their position automatically where you close them. Some users may want to have them open always on another screen, so I prefer not to change that.
Hmmh, I understand and accept the argument.

But please take a closer look at:
http://holgerk.drivehq.com//TC//TC7B1_Search5_ok.gif
and the following operations.
There is still a bug with the consequence, that after reopening the dialog, the dialogs caption bar is moved off screen:
http://holgerk.drivehq.com//TC//TC7B1_Search7_bug.gif

It seems that the position of the expanded(list) search dialog is incorrect clipped/moved to the height of the (smaller) primary screen.
This happens only if the search dialog is on the secondary screen, and the secondary screen has a higher resolution than the primary screen.

Kind regards,
Holger
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, I will try to reproduce it. I still don't understand how the top of the dialog could get so high. Did you get this only after starting the search?
Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Dual screen III: Variable size dialogs

Post by *HolgerK »

This happens directly after pressing the "Start search" button, during the expansion of the "Search results" list.
Every time if the bottom position of the expanded search dialog is below the primary screen's work area lower border, the dialog is moved up, so that the lower border of the dialog is moved above the primary screens lower work area limit.

For example:
The primary screens area is:

Code: Select all

MonitorRect is:	  X:   0   Y:   0   W:1280   H: 960
WorkAreaRect is:	  X:   0   Y:   0   W:1280   H: 890
The secondary screens area is:

Code: Select all

MonitorRect is:	  X:-1600   Y:   0   W:1600   H:1200
WorkAreaRect is:	  X:-1600   Y:   0   W:1600   H:1200
The last search dialog was closed at [ left, top, right, bottom (width x height) ]:

Code: Select all

-1384, 175, -523, 1020 (861 x 845)
The next time I open the dialog, the search result list is hidden:

Code: Select all

-1384, 175, 523, 434 (861 x259)
Starting the search, the search result expands and the dialog is moved up to:

Code: Select all

-1384, 57, 523, 902 (861 x 845)
In this example the dialog remain on screen, because the height is less than the primary screen work area height. But it is still moved up with out any necessary reason.

HTH
Holger
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

I've seen windows getting outside the top border of the screen when the windows taskbar is on the top side and is set to be "on-top" of other windows. Perhaps something similar is happening?
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

wanderer wrote:I've seen windows getting outside the top border of the screen when the windows taskbar is on the top side and is set to be "on-top" of other windows. Perhaps something similar is happening?
Sorry, not in this case!
I got the same result when taskbar is set to "hide automatic", and "always on top" is turned off.

Kind regards,
Holger
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have changed the code now when the search window is resized, so it will be restricted to the screen on which most of the search dialog is shown. This will, however, prevent users from stretching the dialog across multiple screens.
Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

ghisler(Author) wrote:...This will, however, prevent users from stretching the dialog across multiple screens.
Just made a second test with TC7pb3 again.

Two screens vertical aligned.
The task bar is at the top of the primary screen.
Primary: [ X:0 Y:0 W:1280 H:960 ]
Secondary: [ X:0 Y:960 W:1600 H:1200 ]

I resized an expanded search window to: [ X:113 Y:23 W:996 H:2141 ] (vertical span across two screens)
Then I started a second search.
The expanded search window is moved to: [ X:113 Y:-590 W:996 H:2141 ]
(BTW exact the same result when the tasbkar is placed at the bottom of the secondary screen)

So actual it isn't really possible to work with such spanned search windows.

I appreciate Your code change, and will test it again with the next TC-version.
This solution is much better than trying (blind action with keyboard) to move the offscreen window back to the desktop.

Thanks,
Holger
Post Reply