From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Menu-bar flickering on Win10 Date: Fri, 04 Nov 2022 15:54:21 +0200 Message-ID: <8335ay6d0y.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7707"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Johan =?utf-8?Q?Myr=C3=A9en?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 04 14:55:16 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqxAC-0001nA-4d for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Nov 2022 14:55:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqx9R-00015H-Kt; Fri, 04 Nov 2022 09:54:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqx9P-000154-Ny for emacs-devel@gnu.org; Fri, 04 Nov 2022 09:54:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqx9P-0005ID-Fr; Fri, 04 Nov 2022 09:54:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=6vfhcxjtnICGxgRxvlsU1TEB32S2GN+PLtTqnxzgHBo=; b=HOGSKWrl/7t3FvFv0AGr KZlCL45ikzrQLeg0OmwFMaGiebnh06kY81U9IpT0aBwRhiz7RhdA/tp09IZIFKWKPvBu9BmaJ1uoN 2TJZHX05AGurpDYBZRQxUXNFSlOrYTE+ehJ+EYfYVg+OyCFglYsEl03M1M/wIYvxSYG3J/aqK2kAm tWKUiKTFD6USadIpFXPvZUkNJJbobj8KL+vLiFVqBArTgEOqF/aTnUOVwVfP3AFw2M7LJznRjS6Hq 0V1ZHJT5d4Chd5sUg9hvXxmqOcoWApHI23gNQKKa5iZTREAmoIZbBT3sXaJQpVZcz/Odb7PcWomxi XTVDeXyFIIVyiw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqx9O-0005s0-UT; Fri, 04 Nov 2022 09:54:27 -0400 In-Reply-To: (message from Johan =?utf-8?Q?Myr=C3=A9en?= on Fri, 4 Nov 2022 14:51:48 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299133 Archived-At: > From: Johan Myréen > 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.