emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu-bar flickering on Win10


From: Eli Zaretskii
Subject: Re: Menu-bar flickering on Win10
Date: Fri, 04 Nov 2022 15:54:21 +0200

> From: Johan Myréen <johan.myreen@gmail.com>
> Date: Fri, 4 Nov 2022 14:51:48 +0200
> 
> The menu bar flickers for me on Windows, too. It is not as disturbing as for 
> Arash, though.
> 
> I have attached a picture composed of four consecutive (partial) frames from 
> a screen recording. In the
> uppermost frame the Emacs window is just about to lose focus, and in the 
> three lower frames the menu bar
> is being redrawn after losing focus. In the second frame only the word "File" 
> is displayed, in the third frame the
> words "File Edit Options Buffers" and only the fourth frame shows all seven 
> menu headers.
> 
> This result was obtained the way Arash described: I started Emacs with emacs 
> -Q, C-x 5 2 and then switched
> between the two frames.

This is purely a Windows display issue.  Emacs refreshes the menu bar
when another frame gets focus, because that means a different window
becomes the selected window, and when a window becomes selected, it
should be redisplayed.  As a side effect of redisplaying a window, we
recompute the frame's top-level menu items and call the Windows API
that draws the menu.  The expectation from Windows is that it doesn't
actually redraw the menu bar when its contents didn't change, but
evidently in your case that doesn't happen.

Unless someone can point out how to call the Windows APIs in a way
that avoids this, I don't see what we can do with this issue.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]