"Search For" modal dialog outside of screen

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
FroggyTC
Junior Member
Junior Member
Posts: 4
Joined: 2009-01-28, 10:41 UTC

"Search For" modal dialog outside of screen

Post by *FroggyTC »

Hi there,

when I started TC this morning, I wasn't able to use "Search For" and "Rename multiple files" anymore - the program just seemed to be hanging.

I started testing a bit and found out that the modal dialogs opening when clicking "Search For" did actually open, but outside of the visible screen (I am using Vista and I could see the shadow of the dialog at the edge of the screen). Sometimes, this also happens with other applications, but at least, these can be brought back into the visible area of the screen, by clicking "move" in the task bar and using the cursor keys, which is not possible for the modal dialogs in TC.

I resolved the problem by deleting the sections [1680x1050 (10x20)], [1280x1024 (10x20)] and [1920x1200 (10x20)] in "wincmd.ini" (at that moment, I was using two monitors, the primary 1680x1050 stood left of the secondary 1920x1200). I'm sorry I don't know how these sections got messed up in the first place, but I did not change the wincmd.ini manually before this had happened. However, I change my monitors a lot, so this might probably be related to the problem. I don't use any special monitor management software like UltraMon.

Perhaps TC could assure that the position of the modal dialog is in the visible screen area before opening it?

These are the sections I deleted in wincmd.ini:

Code: Select all

[1680x1050 (10x20)]
SyncX=318
SyncY=113
SyncDX=796
SyncDY=588
SyncMax=0
SyncTabs=92,152,247,270,362,422
SearchX=-955
SearchY=18
SearchDX=955
SearchDY=559
SearchMax=0
ConnectX=597
ConnectY=363
ConnectDX=485
ConnectDY=324
ConnectMax=0
CompareX=188
CompareY=171
CompareDX=960
CompareDY=719
CompareMax=1
CompareDivider=502
RenameX=517
RenameY=295
RenameDX=646
RenameDY=460
RenameMax=0
RenameTabs=115,145,345,405,525
[1280x1024 (10x20)]
SyncX=1374
SyncY=157
SyncDX=1045
SyncDY=756
SyncMax=0
SyncTabs=92,185,280,303,395,499
SearchX=1395
SearchY=103
SearchDX=875
SearchDY=516
SearchMax=0
ConnectX=1686
ConnectY=354
ConnectDX=485
ConnectDY=324
ConnectMax=0
CompareX=1423
CompareY=167
CompareDX=960
CompareDY=719
CompareMax=1
CompareDivider=502
RenameX=317
RenameY=282
RenameDX=646
RenameDY=460
RenameMax=0
RenameTabs=115,145,345,405,525
CustColumnX=1308
CustColumnY=28
CustColumnDX=960
CustColumnDY=746
CustColumnMax=0
Tabstops=156,158,212,108,453,93
[1920x1200 (10x20)]
SearchX=618
SearchY=470
SearchDX=684
SearchDY=221
SearchMax=0
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: "Search For" modal dialog outside of screen

Post by *HolgerK »

FroggyTC wrote:I started testing a bit and found out that the modal dialogs opening when clicking "Search For" did actually open, but outside of the visible screen (I am using Vista and I could see the shadow of the dialog at the edge of the screen).
Switching the second monitor on, or just disabling the dual screen option in Vista (or Xp) would help in this case.
Sometimes, this also happens with other applications, but at least, these can be brought back into the visible area of the screen, by clicking "move" in the task bar and using the cursor keys, which is not possible for the modal dialogs in TC.
<Alt+Space><M> <Cursorkeys>
However, I change my monitors a lot, so this might probably be related to the problem. I don't use any special monitor management software like UltraMon.

Perhaps TC could assure that the position of the modal dialog is in the visible screen area before opening it?
TC is doing this already yet, but if the OS still reports that the second monitor is available ...

There is no way to programmatically detect that the second monitor is turned off, or defect, or placed in another room, or ...

Regards
Holger
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3864
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Indeed, there are some values out of rage:
[1280x1024 (10x20)]
SyncX=1374
SyncY=157
SyncDX=1045
SyncDY=756
SearchX=1395
SearchY=103
SearchDX=875
SearchDY=516
SearchMax=0
ConnectX=1686
ConnectY=354
ConnectDX=485
ConnectDY=324
ConnectMax=0
CompareX=1423
CompareY=167
CompareDX=960
CompareDY=719
CompareMax=1
CompareDivider=502
CustColumnX=1308
CustColumnY=28
CustColumnDX=960
CustColumnDY=746
CustColumnMax=0
The source of this wrong values could be, that you attach the second monitor while TC is already running.
AFAIK TC determines the screen resolution on startup only and ignores any further dynamical change.

To overcome this, you may restart TC after a switch from single to dual mode and vice versa.

Note: You can see the currently detected value by menu item "Commands - System Information"
#5767 Personal license
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

sqa_wizard wrote:To overcome this, you may restart TC after a switch from single to dual mode and vice versa.
This is not neccessary!
I just did a test with TC 7.04a (XP):
1) Place the search dialog on the second monitor.
2) Close the search dialog.
3) Display->Properties->Settings: disable second monitor.
4) <Alt+F7>
:arrow: Search dialog is complete visible on the first monitor :!:

Regards
Holger
FroggyTC
Junior Member
Junior Member
Posts: 4
Joined: 2009-01-28, 10:41 UTC

Post by *FroggyTC »

I've probably not been not very clear on my monitor configuration:

Although I change my monitors a couple of times a week, I usually don't change them while the computer is running. And they were both right in front of me and working. The "search for" dialog did appear outside of the visible screen meaning left of the leftmost monitor. I could not click on the dialog and the taskbar thing didn't work as well, but <Alt+Space><M> <Cursorkeys> does help here (thanks to HolgerK for the tip). Of course, only if you know that the trouble was caused by a modal dialog outside the screen, which wasn't very obvious to me (i had to terminate TC via the task manager).

While I was cleaning a very dirty pan, I had some time thinking about how the strange settings might have come to the wincmd.ini. The last time, the 1680 was my primary monitor, it was on the right of the secondary and I have probably dragged the search dialog to the secondary. Now that the 1680 primary is on the left, the modal dialog still wants to appear left of the primary, which is now outside of the screen. So another option to resolve the problem would be to not only store the resolution of the primary monitor in the wincmd.ini, but also the resolutions and order of all other monitors. On the other hand, I don't even care where the search dialog appears, as long as its inside the visible screen... ;-)

I assume, the problem is with SearchX=-955 beeing negative in the 1680 section.
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

FroggyTC wrote:I assume, the problem is with SearchX=-955 beeing negative in the 1680 section.
Quick test (switched primary and secondary monitor position):
I can't confirm your observation with TC 7.04a.
What TC Version do you use?

Regards
Holger
FroggyTC
Junior Member
Junior Member
Posts: 4
Joined: 2009-01-28, 10:41 UTC

Post by *FroggyTC »

I was using 7.02 or something, but I updated to 7.04a when I found the "search for" dialog not working anymore. I can reproduce the problem with 7.04a and my original "erroneous" INI file.

Now I tried to do the same thing as you (switching primary and secondary monitor position) and this doesn't cause a problem: The dialog is displayed completely inside the visible screen.

I do now remember that when I was playing around with wincmd.ini, I deleted every section, but kept all others as they were, but this did not help. When I deleted all three section I posted above, the problem was gone (I don't know what would have happened if I deleted just two sections). There seems to be more than one value causing trouble.

I guess I have to create a minimal wincmd.ini file with the problem, so that we can narrow down which specific values cause the problem. I will post again as soon as I have created the INI file.
FroggyTC
Junior Member
Junior Member
Posts: 4
Joined: 2009-01-28, 10:41 UTC

Post by *FroggyTC »

All I've left in my wincmd.ini is the following:

Code: Select all

[1680x1050 (10x20)]
SearchX=-955
SearchDX=955
If I start TC and click on the "search for" button, it displays the search dialog off screen. My 1680x1050 monitor is the primary of two monitors and it's on the left. Of course, I still don't know how these settings found their way into my wincmd.ini. I'll let you know, if I happen to figure that out.
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Uups. :shock:

Now I can confirm that starting TC with such an setting opens the search dialog off screen:

- Primary monitor @ left side (1600x1200), secondary monitor @ right side (1280x1024)
All available screen coordinates are positive in this case!
-
wincmd.ini Section: wrote:[AllResolutions]
SearchX=-955
SearchDX=955
- Start TC 7.04a (XP Pro SP3)

- <Alt+F7> :arrow: Dialog opens off screen, left beyond the primary monitor border.

- <Enter> :arrow: Dialog is automatically repositioned into the visible area (left side on the primary monitor).

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

Post by *ghisler(Author) »

TC cannot "know" that your second monitor is off as long as it isn't disabled in the system. Windows will still report two monitors. TC tries to restrict all dialogs to the currently visible screens, but this can happen only when it knows that a screen is turned off...
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 »

The point is that the wincmd.ini entries for the search dialog position was created while the search dialog was opened on the secondary monitor which was placed left to primary monitor (-> negative screen coordinate).

The next time TC was used, the secondary monitor was placed right to the primary monitor. (-> only positive screen coordinates)

:arrow: The search dialog persist to open at the negative screen coordinate. :!:
At least the minimal dialog which is shown before the search process was started.

I agree, this will happen only under rare circumstances, because the user normally doesn't change the positions of the secondary monitor so often, but thinking about portable TC installations, this can cause some trouble.

Kind regards
Holger
Post Reply