[TC 11.50b1] Black background flash in search window

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
vladkosi
Junior Member
Junior Member
Posts: 16
Joined: 2022-05-11, 00:41 UTC

[TC 11.50b1] Black background flash in search window

Post by *vladkosi »

This bug has returned - viewtopic.php?t=79351

Tested on Windows 10 64-bit. The flash is most visible (100 ms) when searching in a directory with many files.

https://i.imgur.com/INagIs2.png

TC 11.03 - https://imgur.com/RS7Uobo
TC 11.50 b1 - https://imgur.com/okDp69C
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.50b1] Black background flash in search window

Post by *AntonyD »

Confirmed! and it's VEEERY easy visible on a slow comp!
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50817
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50b1] Black background flash in search window

Post by *ghisler(Author) »

Back then I fixed the flickering by calling application.ProcessMessages; in the resize function.
Unfortunately this had a bad side effect: When typing search characters before the dialog opened would sometimes select them by mistake.
Here is the relevant thread:
viewtopic.php?t=81817

And here is the documented fix:
25.03.24 Fixed: Alt+F7 search: Typing search characters before the dialog opened would sometimes select them by mistake (64)
I tried calling PeekMessage in a loop, removing just WM_PAINT messages and handling them with DispatchMessage, but the flickering didn't disappear. Maybe I need to handle some other messages?
Author of Total Commander
https://www.ghisler.com
vladkosi
Junior Member
Junior Member
Posts: 16
Joined: 2022-05-11, 00:41 UTC

Re: [TC 11.50b1] Black background flash in search window

Post by *vladkosi »

Maybe WM_ERASEBKGND?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50817
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50b1] Black background flash in search window

Post by *ghisler(Author) »

I will try it.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50817
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50b1] Black background flash in search window

Post by *ghisler(Author) »

It doesn't seem to help much, but I will keep it in beta 2 for test purposes.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.50b1] Black background flash in search window

Post by *AntonyD »

What is surprising is that after I returned to using the stable release 11.03
I began to notice that it had exactly the same problems! They were just very rare
or were barely noticed. But now the eyes are suddenly “accustomed to catching” this kind of thing.
And now I see it.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50817
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50b1] Black background flash in search window

Post by *ghisler(Author) »

That's because 11.03 also draws over that black background, just earlier than 11.50.
Author of Total Commander
https://www.ghisler.com
vladkosi
Junior Member
Junior Member
Posts: 16
Joined: 2022-05-11, 00:41 UTC

Re: [TC 11.50b1] Black background flash in search window

Post by *vladkosi »

It seems to be fixed in beta 2 - https://imgur.com/kwNoV2S

I've never noticed it in 11.03.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50817
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50b1] Black background flash in search window

Post by *ghisler(Author) »

I'm now handling WM_PAINT, WM_ERASEBKGND and the Lazarus-specific LM_PAINT messages immediately, which seems to help a bit.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5964
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.50b1] Black background flash in search window

Post by *white »

ghisler(Author) wrote: 2024-10-16, 12:53 UTC I'm now handling WM_PAINT, WM_ERASEBKGND and the Lazarus-specific LM_PAINT messages immediately, which seems to help a bit.
Helps a lot. Tested OK using TC 11.50b2 64-bit.
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.50b1] Black background flash in search window

Post by *AntonyD »

Yep, helps a lot indeed. But I have a strong feelings that now for 1 - 1.5 sec. this dialog appears slower than before...
Last edited by AntonyD on 2024-10-17, 13:04 UTC, edited 1 time in total.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50817
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50b1] Black background flash in search window

Post by *ghisler(Author) »

Moderator message from: ghisler(Author) » 2024-10-17, 08:01 UTC

Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
Post Reply