Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: petermad, Stefan2, Hacker

Post Reply
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53149
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *ghisler(Author) »

OK, I think I know now why this WM_COMMAND doesn't work. Could you provide a test plugin where you send the command, please? This way I could test my bugfix.

I also checked TCModPlug, and here GetFocus returns zero. Also WPARAM of WM_KILLFOCUS is also zero (sent to the Lister window which had the focus before the click on TCModPlug). Therefore TC can't determine the location of the window. If you observe the Total Commander title bar, you will see that TC is no longer the foreground (active) window when clicking on the quick view panel with TCModPlug.
Author of Total Commander
https://www.ghisler.com
AkulaBig
Power Member
Power Member
Posts: 776
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

ghisler(Author) wrote: 2026-04-12, 08:41 UTC Could you provide a test plugin where you send the command, please? This way I could test my bugfix.
All my plugins are hosted on totalcmd.net. For example, TCSumatraPDF https://totalcmd.net/plugring/wlx_TCSumatraPDF.html
ghisler(Author) wrote: 2026-04-12, 08:41 UTC I also checked TCModPlug, and here GetFocus returns zero. Also WPARAM of WM_KILLFOCUS is also zero (sent to the Lister window which had the focus before the click on TCModPlug). Therefore TC can't determine the location of the window. If you observe the Total Commander title bar, you will see that TC is no longer the foreground (active) window when clicking on the quick view panel with TCModPlug.
In all my plugins I use Ctrl+Tab to switch between TC and the application window.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53149
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *ghisler(Author) »

Ctrl+Tab switches tabs. Do you mean just Tab? This focuses the main Quick View panel when using TCModPlug, you can't control TCModPlug with the keyboard when it has the focus.
All my plugins are hosted on totalcmd.net.
So does any of your plugins send WM_COMMAND with LPARAM=FFF80000 when it gets the focus? I tried the latest TCModPlug, and it doesn't.
Author of Total Commander
https://www.ghisler.com
AkulaBig
Power Member
Power Member
Posts: 776
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

ghisler(Author) wrote: 2026-04-13, 08:52 UTC you can't control TCModPlug with the keyboard when it has the focus.
TCModPlug is a very old plugin. I did not implement Ctrl+Tab in it. In all my other plugins I have these lines:

Code: Select all

//Ctrl+TAB keys pressed
//allows you to go from the application window to the Lister window
case VK_TAB: {
		if (GetKeyState(VK_CONTROL) & KEY_PRESSED) {
		SetForegroundWindow(GetWindow(hListerHandle, GW_CHILD));
		SetFocus(GetWindow(hListerHandle, GW_CHILD));
		}
		break;
}
And the code for the reverse transition. In general, it will be necessary, if possible, to fix some plugins so that they all work the same.
ghisler(Author) wrote: 2026-04-13, 08:52 UTC So does any of your plugins send WM_COMMAND with LPARAM=FFF80000 when it gets the focus? I tried the latest TCModPlug, and it doesn't.
No, I don't use it. I can't even find on the internet what this command means. Can you write it in text form?
User avatar
white
Power Member
Power Member
Posts: 6941
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *white »

Moderator message from: white » 2026-04-13, 13:15 UTC

AkulaBig wrote: 2026-04-13, 12:34 UTC TCModPlug очень старый плагин. В нем я не реализовывал Ctrl+Tab. Во всех других плагинах у меня есть такие строки:
Replaced with English translation:
TCModPlug is a very old plugin. I did not implement Ctrl+Tab in it. In all my other plugins I have these lines:
AkulaBig
Power Member
Power Member
Posts: 776
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

white wrote: 2026-04-13, 13:15 UTC Replaced with English translation:
Sorry. I was in a hurry and didn't translate.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53149
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *ghisler(Author) »

No, I don't use it. I can't even find on the internet what this command means. Can you write it in text form?
It's a new addition in Total Commander 11.57 RC3 where you can tell Total Commander to show the focus on the plugin:
07.04.26 Added: Quick view panel: Lister plugins can now notify Total Commander when they gain focus: WM_COMMAND with high word of lparam set to itm_focus (32/64)
The plugin can send it to the Lister window it received via ListLoad when it gets focus. This is ONLY necessary when Total Commander can't detect the focus change by itself. Unfortunately it does nothing in RC3, but will work in RC4 if all goes well.

It's also document in the latest LS-Plugin Guide 2.13 available here:
https://www.ghisler.com/plugins.htm#lister
Author of Total Commander
https://www.ghisler.com
AkulaBig
Power Member
Power Member
Posts: 776
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

ghisler(Author) wrote: 2026-04-14, 08:08 UTC
Thanks for the clarification. Everything is clear.
Fla$her
Power Member
Power Member
Posts: 4033
Joined: 2020-01-18, 04:03 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *Fla$her »

ghisler(Author) wrote: 2026-04-07, 08:22 UTC I found a simple solution: All I need to do is get the window rectangle (GetWindowRect) of the focused window and compare it to the rectangle of the quick view panel. If the focused window is entirely inside the quick view panel, it must be the plugin.
If it works like this now, then why does nothing happen when clicking on the slister toolbar (above the content)?

I also don't see any descriptions of new fixes on the topic in the RC4 history.

With TC1by1, I think we should wait for a fix in the plugin, since there is no activation at all right now.
Overquoting is evil! 👎
AkulaBig
Power Member
Power Member
Posts: 776
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

Fla$her wrote: 2026-04-15, 15:17 UTC I also don't see any descriptions of new fixes on the topic in the RC4 history.
Nothing has changed for me either.
Fla$her wrote: 2026-04-15, 15:17 UTC With TC1by1, I think we should wait for a fix in the plugin, since there is no activation at all right now.
I have it activated already with RC2 or RC3.
Fla$her
Power Member
Power Member
Posts: 4033
Joined: 2020-01-18, 04:03 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *Fla$her »

AkulaBig wrote: 2026-04-15, 18:06 UTC I have it activated already with RC2 or RC3.
You wrote "No, I don't use it". The plugin has not been updated for a month.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53149
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *ghisler(Author) »

If it works like this now, then why does nothing happen when clicking on the slister toolbar (above the content)?
It depends on where you click:
1. When you click for example on the background of the toolbar, or on the save button+ESC, the focus STAYS in the file list. You can still scroll with the cursor keys.
2. When you click in one of the edit boxes, the focus switches to the quick view panel and the title bar changes.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 4033
Joined: 2020-01-18, 04:03 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *Fla$her »

Can you explain the reason for this behavior? How can this be related to the quote I gave, where you evaluate the area, not the controls?
Overquoting is evil! 👎
AkulaBig
Power Member
Power Member
Posts: 776
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

Fla$her wrote: 2026-04-15, 22:39 UTC
AkulaBig wrote: 2026-04-15, 18:06 UTC I have it activated already with RC2 or RC3.
You wrote "No, I don't use it". The plugin has not been updated for a month.
It's some kind of translation problem. Of course I use my own plugin.
The quick view window title is activated in Total Commander, not in the plugin. I can't do this in the plugin, because that's how 1by1 works.
Fla$her
Power Member
Power Member
Posts: 4033
Joined: 2020-01-18, 04:03 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *Fla$her »

AkulaBig wrote:Of course I use my own plugin.
You didn't write this about using a plugin, but about sending a message that TC needs to activate the panel at that moment.
Until you do this, the panel will not activate, as in my case.
Overquoting is evil! 👎
Post Reply