From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: menu-bar: disable items when no frame visible Date: Mon, 28 Nov 2005 22:23:11 +0200 Organization: JURTA Message-ID: <87d5kkn30k.fsf@jurta.org> References: <708F3D2D-A87C-4F80-BC27-171D82653F4D@gmail.com> <069BF3EB-C5E4-4042-91E9-0DFB37C58E99@gmail.com> <36F6CF11-E742-4175-A995-E5A62EC2A335@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133210804 18308 80.91.229.2 (28 Nov 2005 20:46:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2005 20:46:44 +0000 (UTC) Cc: david.reitter@gmail.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 28 21:46:30 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Egppr-0001Lm-Qd for ged-emacs-devel@m.gmane.org; Mon, 28 Nov 2005 21:42:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Egppq-0004pY-VC for ged-emacs-devel@m.gmane.org; Mon, 28 Nov 2005 15:42:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Egpn8-0003Z5-2q for emacs-devel@gnu.org; Mon, 28 Nov 2005 15:40:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Egpn4-0003XY-K9 for emacs-devel@gnu.org; Mon, 28 Nov 2005 15:40:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Egpn4-0003XT-G4 for emacs-devel@gnu.org; Mon, 28 Nov 2005 15:39:58 -0500 Original-Received: from [194.126.101.98] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Egpmx-0007Nt-6g; Mon, 28 Nov 2005 15:39:51 -0500 Original-Received: from mail.neti.ee (80-235-44-28-dsl.mus.estpak.ee [80.235.44.28]) by Relayhost1.neti.ee (Postfix) with ESMTP id 7C4A53DBA; Mon, 28 Nov 2005 22:40:03 +0200 (EET) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Mon, 28 Nov 2005 07:32:32 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46720 Archived-At: > The issue is how to determine that a frame that displays the current > menu is visible. The code we are discussing tries to use > menu-updating-frame, but it looks like that variable is not > a reliable way of finding the frame in question at the point where > we need it (which is when a menu is dropped after a mouse click). > Perhaps someone could suggest a better way of finding the menu's frame. As I proposed to replace (if (display-multi-frame-p) menu-updating-frame (selected-frame)) with (or menu-updating-frame (selected-frame)) it seems this condition will work on all configurations. For toolkits that set `menu-updating-frame', it will work exactly as now (i.e. it will disable menu items if there's no visible frame). For non-toolkit configurations and terminals, where the menu is drawn on the same frame, it will give the correct result too (with selected-frame). Could someone find a configuration where this doesn't work? -- Juri Linkov http://www.jurta.org/emacs/