Never steal focus
Moderators: Hacker, petermad, Stefan2, white
Never steal focus
Stealing the focus from another window is very annoying and I can't think of a good reason to do it. Besides it being annoying for suddenly interrupting you, it can also lead to accidentally pressing a dialog button or accidentally dismissing something.
An example in TC is queue copying (F2); when it requests interaction (disk full, overwrite file...), it pops up a dialog box over the main TC window or any other program in focus. The "regular" copy operation does that too, except for "Disk is full!" messages where it only "flashes" the TC button in the taskbar (some inconsistent behavior there).
I think flashing/blinking the TC button in the taskbar is the best alternative. But anything is better than stealing focus, even Windows notifications.
An example in TC is queue copying (F2); when it requests interaction (disk full, overwrite file...), it pops up a dialog box over the main TC window or any other program in focus. The "regular" copy operation does that too, except for "Disk is full!" messages where it only "flashes" the TC button in the taskbar (some inconsistent behavior there).
I think flashing/blinking the TC button in the taskbar is the best alternative. But anything is better than stealing focus, even Windows notifications.
Last edited by chea on 2024-09-20, 12:41 UTC, edited 1 time in total.
Re: Never steal focus
Support++I think flashing/blinking the TC button in the taskbar is the best alternative.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Never steal focus
Hasn't that been standard Windows behavour for a long time?I think flashing/blinking the TC button in the taskbar is the best alternative.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Never steal focus
Yes, it's been there for a long time.
The problem is that in some cases TC doesn't use that feature and it pops up a message box over the active window instead.
I've been annoyed many times by this when copying files to a USB drive in the background while doing something else.
TC copy with queue -> "Disk is full!" message pops up over the active window.
TC copy with queue or normal copy -> "Overwrite file" message pops up over the active window.
Same with "long paths" message...
But:
TC normal copy -> "Disk is full!" message only causes flashing/blinking in the taskbar - GOOD! This is how I wish TC would always behave.
The problem is that in some cases TC doesn't use that feature and it pops up a message box over the active window instead.
I've been annoyed many times by this when copying files to a USB drive in the background while doing something else.
TC copy with queue -> "Disk is full!" message pops up over the active window.
TC copy with queue or normal copy -> "Overwrite file" message pops up over the active window.
Same with "long paths" message...
But:
TC normal copy -> "Disk is full!" message only causes flashing/blinking in the taskbar - GOOD! This is how I wish TC would always behave.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Never steal focus
That's odd, I'm not calling any code to bypass this Windows behaviour.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Never steal focus
I just finished some tests, using another Windows 10 system, let's call it system B. The test consisted of copying some files, with an existing file in the destination with the same name, prompting the overwrite dialog.
This is what I found:
1. On system B I was unable to trigger the focus stealing behavior from TC over a different program that was in focus. So I went back to system A and I noticed that there also the focus stealing doesn't happen every time, only most of the time.
Pardon my language, but WTF?? I can only guess that it's because of some software running on system A or it's just some weird Windows problem. I'd love to have an explanation and a solution for this. But in the end, maybe it's not a TC problem and maybe you can't do anything about it.
EDIT: After some testing, it looks like it might be caused by Monitorian (v3.15.0). So far after removing it I'm not getting TC focus stealing over other programs.
EDIT 2: Nope. Maybe without Monitorian I get fewer focus stealing pop-ups, but they're still there.
2. The focus stealing window pop-up from the TC queue over the main TC window happened always, even on system B. Can you confirm that this is how it's designed to behave? If yes, my feature request to change this still stands.
This is what I found:
1. On system B I was unable to trigger the focus stealing behavior from TC over a different program that was in focus. So I went back to system A and I noticed that there also the focus stealing doesn't happen every time, only most of the time.
Pardon my language, but WTF?? I can only guess that it's because of some software running on system A or it's just some weird Windows problem. I'd love to have an explanation and a solution for this. But in the end, maybe it's not a TC problem and maybe you can't do anything about it.
EDIT: After some testing, it looks like it might be caused by Monitorian (v3.15.0). So far after removing it I'm not getting TC focus stealing over other programs.
EDIT 2: Nope. Maybe without Monitorian I get fewer focus stealing pop-ups, but they're still there.
2. The focus stealing window pop-up from the TC queue over the main TC window happened always, even on system B. Can you confirm that this is how it's designed to behave? If yes, my feature request to change this still stands.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Never steal focus
It seems to be controlled by the registry key "foregroundlocktimeout", see e.g.
elevenforum.com
elevenforum.com
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Never steal focus
No, that's not it. I already checked that before.
And it happens sporadically, so it's hard to pin down. But whatever is causing it is not directly related to TC, because it affects Double Commander too.
So forget about issue n.1, because it's system-related. I mean, I'd like to solve it, but it doesn't have to be in "TC suggestions".
But we can keep the thread alive for issue n.2: queue notification pop-up over the main TC window. That one happens everywhere, it's not a bug.
And it happens sporadically, so it's hard to pin down. But whatever is causing it is not directly related to TC, because it affects Double Commander too.
So forget about issue n.1, because it's system-related. I mean, I'd like to solve it, but it doesn't have to be in "TC suggestions".
But we can keep the thread alive for issue n.2: queue notification pop-up over the main TC window. That one happens everywhere, it's not a bug.