x64: ESC key triggers flicker and element resize

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

x64: ESC key triggers flicker and element resize

Post by *milo1012 »

Maybe just a cosmetic issue at first sight, but it's rather annoying:

On TC x64 (but not in 32-bit!), pressing the ESC key will make most TC UI elements slightly "flicker" (due to redraw?), and, most prominent, will very briefly mess up the highlighted file tabstops in brief view (making the file extension appear far too right for a fraction of a second).

2nd and most likely related:
When having folder tabs on one side and set a specific font, the first ESC key press will make the current directory bar grow one pixel in height and slightly mess up tabstops as well.


Just see this animated gif for TC x64, in which I used the esc key multiple times in a row:
https://abload.de/img/tc9_x64_esc_drop_flicakyup.gif

Note: I set all fonts in TC to Tahoma 8 for making 2nd issue appear in the gif, but I guess that another font/size would work too.



Tested with 9.0a RC3 x64
Windows 7 Classic Theme/View
TC plugins: PCREsearch and RegXtract
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

ESC first closes the quick search box and then clears a quick filter.

ESC also clears the command line and hides it if is unchecked in Configuration - Options - Layout. It also moves the cursor to the active panel. Why would you press ESC while not in the command line, or not using a quick filter?
When having folder tabs on one side and set a specific font, the first ESC key press will make the current directory bar grow one pixel in height and slightly mess up tabstops as well.
Looks like a rounding error, e.g. when the window is an uneven number of pixels wide or so. Unfortunately I cannot reproduce it so far.
Author of Total Commander
https://www.ghisler.com
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

Well, the main question is why a key stroke triggers an UI redraw/refresh at all. Plus this behavior shows only for x64 TC, 32-bit TC is not affected. So no matter what the exact UI bug is, it's one of those typical small differences between 32- and 64-bit TC (maybe another Lazarus bug/glitch?). Preventing UI interaction when pressing Esc, like 32-bit TC does, would fix both issues.
But sure, fixing it should probably have low priority.

Here is a small video that shows better how the escape key triggers flicker (sadly I can't capture at full 60 FPS, where the redraw would be visible even better):
https://drive.google.com/file/d/0B2cDGKZKN6SnZjJwSHUxMjlLc2s
BTW, I just noticed (and you can see in the video) that TC x64 triggers a (horizontal) resize mouse cursor between each tabstop in the tabstop header, while 32-bit TC does not. Not sure if this is a known behavior, so I guess another Lazarus bug.

ghisler(Author) wrote:Why would you press ESC while not in the command line, or not using a quick filter?
I'm one of those people who press Esc constantly until the wanted operation is finally done, because many Windows programs out there are not able to react instantly on the first key strike, and so over the years you're getting used to sometimes pressing more often than necessary ;)
In TC this is basically for every message box or dialog, plus e.g.
- delete confirmation message box
- aborting a tree view (Ctrl+B) which takes a long time
- ...
TC plugins: PCREsearch and RegXtract
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

As I said, ESC may trigger a situation where the command line must be hidden.
Author of Total Commander
https://www.ghisler.com
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

2ghisler
I understood that, but I posted it because it's an obvious difference between 32- and 64-bit TC, so I thought that there might be an easy fix for it.
But if you think that this is not fixable or not worth investigating any further, I wouldn't mind if this thread is moved to "TC Behaviour which will not be changed".
TC plugins: PCREsearch and RegXtract
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

history.txt wrote:11.12.16 Fixed: Reduced flickering when pressing ESC while not in command line (32/64)
Seems to work as expected in 9.0a final. Thanks for the quick fix!
TC plugins: PCREsearch and RegXtract
Post Reply