Drag&Drop does not work when Alt+Tabbing with VistaSwitc

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Drag&Drop does not work when Alt+Tabbing with VistaSwitc

Post by *Flint »

I've been using VistaSwitcher for quite long time as Alt+Tab replacement tool, and in WinXP 32- and 64-bit everything was fine. But after switching to Win7 I noticed that with VistaSwitcher installed I can no longer drag&drop files from TC if I use Alt+Tab to switch to the target application: after Alt+Tab the cursor takes its defalt form, and when I release the left mouse button nothing happens. If I shut down VistaSwitcher, drag&drop across Alt+Tab starts working correctly again.

Of course, the problem might lie in VistaSwitcher itself, but other applications continue to process drag&drop correctly even when VistaSwitcher runs (for example, it's still possible to drag&drop files from Windows Explorer, or selected text from EmEditor), so I figured there could be something wrong with TC.

OS: Win7 x64 SP1 Professional
TC: 7.56a, 8.0β11 x32, 8.0β11 x64
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48023
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Try dragging the file outside of the TC window before using Alt+Tab. It seems that TC doesn't notice the focus loss on Alt+Tab (maybe no WM_KILLFOCUS is sent), and therefore doesn't switch from internal to external drag&drop.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author) wrote:Try dragging the file outside of the TC window before using Alt+Tab.
It's impossible, I always keep TC window maximized…
ghisler(Author) wrote:It seems that TC doesn't notice the focus loss on Alt+Tab (maybe no WM_KILLFOCUS is sent), and therefore doesn't switch from internal to external drag&drop.
Hm… It doesn't look this way. Even when I Alt+Tab into some application and then (without releasing the mouse) Alt+Tab back into TC, the drag&drop is dropped completely: the mouse cursor does not have a [+] picture (nor the "forbidden" crossed circle), and releasing the left button does not do anything.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Flint,
But after switching to Win7 I noticed that with VistaSwitcher installed I can no longer drag&drop files from TC if I use Alt+Tab to switch to the target application: after Alt+Tab the cursor takes its defalt form, and when I release the left mouse button nothing happens
Works fine here. The cursor takes the default form immediately after releasing Alt-Tab but when I move the mouse it changes back to the "drop" cursor.
W7 x64 HP, TC 8.0b11 both 32- and 64-bit.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

Hacker wrote:Works fine here.
You mean, you tested with VistaSwitcher installed and running, and drag&drop was not cancelled after Alt+Tabbing?
Without VistaSwitcher everything works fine on my computer too…
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Flint,
You mean, you tested with VistaSwitcher installed and running, and drag&drop was not cancelled after Alt+Tabbing?
Exactly.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Maybe some elevation problem?
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

MVV wrote:Maybe some elevation problem?
Doesn't look so. Both TC and VistaSwitcher work non-elevated.


I performed some more experiments and got the following results:

1) Start TC non-maximized; start dragging a file; move the cursor outside of TC window; press and hold Alt, then press Tab, Shift+Tab, then release Alt (to initialize Alt+Tab handler but remain in TC afterwards); now move cursor back into TC window -> drag&drop remains working.

2) Start TC (maximized or not); start dragging a file; move the cursor over inactive file panel; press Alt+Tab -> Alt+Tab window opens and immediately forcibly closed; the drag&drop operation suddenly executes and Copy dialog appears in TC, as if I released the left mouse button already (which of course I didn't).

3) Doing the same, but moving mouse cursor over the command line before pressing Alt+Tab -> the file name is inserted into command line (again, premature completion of drag&drop routine).

So, when I press Alt+Tab, and the mouse cursor is over the TC window, TC behaves as though I release the mouse button. I tried to catch messages with Spy++ and, indeed, WM_LBUTTONUP is posted into main TC window. I wonder why it is sent here, why it is not sent in XP and why on Hacker's computer it is not sent or not processed by TC… I'll try to experiment on XP and also in Win7 without VistaSwitcher.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48023
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's impossible, I always keep TC window maximized…
No taskbar???
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author) wrote:No taskbar???
Well, almost. :) I use it in auto-hide mode, so I didn't think that I could use it for that purpose.

However, in any case it's not very convenient to move mouse to the other end of 24" monitor each time before pressing Alt+Tab… :) As I wrote above, it seems that TC receives WM_LBUTTONUP for unknown reason which causes it to process the Drop action. I checked: if VistaSwitcher is not running, WM_LBUTTONUP does not come into TC during Alt+Tabbing. I will test whether other applications receive the same message and try to find out how they deal with it.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

I tested in an almost clean virtual machine with Windows 7 Pro x64, and still the same effect. So it cannot be some combination of hooker applications in my system as I thought as one of possible sources of the problem…

Hacker
Could you please test once more, exactly as described in this post? I mean, pp. 2 and 3.
Which version of VistaSwitcher do you use? Is UAC turned on or off? Are TC and VistaSwitcher running elevated or not?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Flint,
2) Start TC (maximized or not); start dragging a file; move the cursor over inactive file panel; press Alt+Tab -> Alt+Tab window opens and immediately forcibly closed;
Does not close here, as long as I keep holding Alt.
3) Doing the same, but moving mouse cursor over the command line before pressing Alt+Tab -> the file name is inserted into command line
Nope, mouse button does not act as if released.
Which version of VistaSwitcher do you use?
1.1.4 64-bit.
Is UAC turned on or off?
Off.
Are TC and VistaSwitcher running elevated or not?
Running everything as admin.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

Hacker wrote:Running everything as admin.
Ah, that's the difference. I tested it once and there seemed to be no drag&drop breaking, but since it's not my usual configuration I did not investigate it more.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
I wrote to the author of VistaSwitcher, and he replied that it does not send WM_LBUTTONUP. He suggested that the reason might be that he calls AttachThreadInput to the active window's thread and then shows and focuses the VistaSwitcher window. He also wrote that the problem might lie in the TC's handler for Drag&Drop or WM_KILLFOCUS.

Could you please comment on this?

PS: I also experimented on another computer with Vista Business 32-bit, and there the problem is also reproduced (when TC is running non-elevated).
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48023
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, no idea...
Author of Total Commander
https://www.ghisler.com
Post Reply