emacs-devel
[Top][All Lists]
Advanced

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

Re: menu-bar: disable items when no frame visible


From: Juri Linkov
Subject: Re: menu-bar: disable items when no frame visible
Date: Mon, 28 Nov 2005 22:23:11 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> 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/





reply via email to

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