[Top][All Lists]
[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: |
Tue, 06 Dec 2005 02:54:54 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> GTK menus can be detached from their frame. I am not absolutely sure
> (and not able to test right now) what happens if you minimize their
> frame (or otherwise make it invisible) though.
>
> Can someone tell us what the detached GTK menu bar does
> when there is no visible frame? Which frame does it operate on?
It operates on the frame from which it was detached. This frame
remains invisible after selecting a menu item from the visible menu.
> Is the suggestion (or menu-updating-frame (selected-frame)) correct
> for the GTK case?
At least, it doesn't make things worse. I discovered that currently
even GTK builds have the same bug as on non-toolkit builds. For example,
after evaluating on a GTK build:
(define-key global-map [down-mouse-3] menu-bar-file-menu)
the menu item "Save As..." is disabled in the popup menu called via [mouse-3].
After looking at the code I suspect that the same bug exists on W32 and OSX.
In w32menu.c and macmenu.c `x-popup-menu' after setting Vmenu_updating_frame
to the frame `f', resets it immediately to nil, so Vmenu_updating_frame
eventually is always nil in popup menus. And xmenu.c doesn't set
Vmenu_updating_frame at all in `x-popup-menu'. I guess the correct code
for all three platforms should be:
if (! NILP (position))
{
...
XSETFRAME (Vmenu_updating_frame, f);
}
else
Vmenu_updating_frame = Qnil;
Is it right?
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: menu-bar: disable items when no frame visible,
Juri Linkov <=
- Re: menu-bar: disable items when no frame visible, Richard M. Stallman, 2005/12/06
- Re: menu-bar: disable items when no frame visible, Juri Linkov, 2005/12/06
- Re: menu-bar: disable items when no frame visible, Richard M. Stallman, 2005/12/07
- Re: menu-bar: disable items when no frame visible, Jan D., 2005/12/12
- Re: menu-bar: disable items when no frame visible, Eli Zaretskii, 2005/12/12
- Re: menu-bar: disable items when no frame visible, Jan Djärv, 2005/12/13
- Re: menu-bar: disable items when no frame visible, Eli Zaretskii, 2005/12/13
- Re: menu-bar: disable items when no frame visible, Juri Linkov, 2005/12/14
- Re: menu-bar: disable items when no frame visible, Eli Zaretskii, 2005/12/14
- Re: menu-bar: disable items when no frame visible, Juri Linkov, 2005/12/16