Focus bug switching panel

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
vfloyd
Junior Member
Junior Member
Posts: 21
Joined: 2013-12-19, 10:28 UTC
Location: France

Focus bug switching panel

Post by *vfloyd »

Hello,

I use total commander 8.5 with plugin synwrite 6.1.185.

My problem is that when I run internal Lister (F3) with synwrite plugin, I can't switch focus to it while the lexer of synwrite is working. When the file is totally loaded it works. For big files it may take many seconds.

You could tell me that it's normal because synwrite is busy. But no. The "bug" occurs only if I want to switch panel focus using tab key. If I click with the mouse on the lister panel, the focus is set on it and I can navigate in the file normaly even if it is not completly loaded.

Sorry for my english, tell me if something is not clear.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately most lister plugins are not thread-safe, so TC tells them in the foreground thread to load the file. If the plugin then starts its own message loop, some TC functions like handling Tab do not work because they are handled in the main message loop (tab is special because Windows would intercept it before it reaches the dialog to switch between controls, so it has to be handled before).

Therefore there is unfortunately nothing I can do, sorry.

Btw, is this problem specific to TC 8.5? I'm not aware of any changes since TC8.
Author of Total Commander
https://www.ghisler.com
vfloyd
Junior Member
Junior Member
Posts: 21
Joined: 2013-12-19, 10:28 UTC
Location: France

Post by *vfloyd »

Thank for your answer. No the problem is the same in tc8 and tc8.5. Sorry if I didn't post at the right place. I will report this bug to synwrite developpers.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Hi. It's not a bug really. It's issue of TC plugins api.
vfloyd
Junior Member
Junior Member
Posts: 21
Joined: 2013-12-19, 10:28 UTC
Location: France

Post by *vfloyd »

Ok sorry maybe I didn't completly understood Ghisler's answer. he told there was nothing he could do. But if the bug is in the TC API, who can correct it if not you :p
Last edited by vfloyd on 2013-12-19, 16:17 UTC, edited 1 time in total.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Ghisler can't easily "fix" it. it's big work
vfloyd
Junior Member
Junior Member
Posts: 21
Joined: 2013-12-19, 10:28 UTC
Location: France

Post by *vfloyd »

Ah ok I understand. It's unfortunate.
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Some long-term idea: plugins could notice TC somehow (for example by exporting some function) that they are able to perform some operations asynchronously.
vfloyd
Junior Member
Junior Member
Posts: 21
Joined: 2013-12-19, 10:28 UTC
Location: France

Post by *vfloyd »

And waiting a deeper refactoring would it be possible to generate a left-click mouse event in the panel when tab key is pressed ?
Post Reply