Background transfer manager don't back focus to TC

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
x0r
Junior Member
Junior Member
Posts: 2
Joined: 2008-06-09, 08:03 UTC
Location: Ukraine

Background transfer manager don't back focus to TC

Post by *x0r »

When using BTM (F5-F2/F6-F2) and BTM window don't open already, focus not returning to main TC window.
It is inherent on multi-core CPUs systems or hyper-treading enabled.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I don't understand the problem. Can you give me step by step instructions on how to reproduce it, please? What Windows version do you use? I can test on a Core 2 Duo system with Windows XP or Vista home.
Author of Total Commander
https://www.ghisler.com
x0r
Junior Member
Junior Member
Posts: 2
Joined: 2008-06-09, 08:03 UTC
Location: Ukraine

Post by *x0r »

Excuse for brevity, English is not my native.
Tested on Win. XP(SP2 + KB896256) RU(Russian edition), Win. XP(SP3) RU.
May be localizing is a reason, but I don't sure...
Hardware: (PC I965, P35) Intel P4 Core Duo, Core Quad, and noutbooks with Celeron, Celeron Mobility.

Step-by-step:
Run TC
select files to copy/move (try the big one, >200Mb)
press F5(F6), then F2
Background Transfer Manager form is opened and focused.
On multi-core CPU - focus don't sending back to main form.
On single-core CPU (Celeron in example) - is OK (Main TC form on focus).

If "copy in background" method using (F5, OK, Copy in Backgr.) - focus is correctly remains on main form on all hardware conditions.

Sorry for poor English and thank you for your work!
Last edited by x0r on 2008-06-10, 10:07 UTC, edited 1 time in total.
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

I confirm this with Intel Dual CPU.
TC for Linux please!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I could reproduce it now. It seems that Windows handles my SetFocus command (to focus the main window) first, before focusing the background panel, so the focus goes to the main window and immediately back to the background window. Calling a messagre loop (PeekMessage etc.) just before SetFocus seems to fix the problem...
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2ghisler(Author)
Calling a messagre loop (PeekMessage etc.) just before SetFocus seems to fix the problem...
If this does no harm, maybe you could add this to cm_FileSync, too,
to fix the occasional focus problem in with RAR archives as target?
Sync into RAR: focus lost, file list lost
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Fix confirmed by topicstarter at russian forum:
link (google translate)
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Great, thanks!
Author of Total Commander
https://www.ghisler.com
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

Hi,

I have this problem on two computers, TC 7.56a :
W7 64b quad core @home
XPSP3 32b dual core @ office

I noticed it a few weeks back then I trace the problem to the 7.56 Beta 2 version (17/11/2010 ; not the 7.56a rc2)

Before this version it was working correctly

It seems that the problem appears when the btm is triggered really fast
(option AlwaysCopyInBackground is set)
Select files, F5, Enter => the copy dialog is almost not visible, there's just a -glitch-
If I wait for the copy dialog to appear, the problem does not seem to occur
TC#88260 -
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Any idea where the focus goes to? Maybe some other program catches it when TC loses it?
Author of Total Commander
https://www.ghisler.com
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

I tried with the following autohotkey code, the message box is always empty when the focus is lost

Code: Select all

SPACE::
{
DetectHiddenWindows, On
ControlGetFocus, OutputVar, A
if ErrorLevel
{
	WinGetTitle, Title, A
	MsgBox,%Title%
}
else
    MsgBox, Control with focus = %OutputVar%
}
returnn
TC#88260 -
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Can you press Alt+F4 when it happens, and check what program disappears?
Author of Total Commander
https://www.ghisler.com
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

No program are closed
Active program (during this test) : TC & firefox

It's the same it there is more program window (or just TC)
I'll do some more testing
TC#88260 -
Post Reply