Subject: Re: bug#4843: creating menus

From: "Jan D." <[email-masked]>
Date: Mon, 02 Nov 2009 09:20:18 +0100

On 2009-11-02 02:44, Chong Yidong wrote:
>> It can be because you are now using a newer Gtk+ version.  Please use
>> report-emacs-bug so we can see that at once instead of having to ask.
>>
>> If indeed you are using Gtk+, it is due to the introduction of native windows.
>> To see if this is the case, start emacs with
>> % GDK_NATIVE_WINDOWS=1 emacs
>> and try again.
>
> I don't have any recollection of this problem.  Could you elaborate?  If
> the menus don't work properly unless GDK_NATIVE_WINDOWS=1, maybe we
> should set it unconditionally.

Native windows is Gtk having internal windows that map to the same X 
window.  This confuses Emacs, mostly when it tries to map X events for 
windows to frames.  I.e. there might not be separate X windows in the 
menu that is children to the frame X window.  See bug #4122.

I'd rather not set GDK_NATIVE_WINDOWS as it disables the optimizations 
that native windows give.  It may also be removed in a future Gtk+ 
release, so it isn't a good solution.

It isn't hard to fix emacs 22 as well, but does this bug warrant a new 
22 release?  Maybe, as distributions like Ubuntu still ships 22 (see the 
linked Ubuntu bug in #4122).  A 23-release soonish is not wrong though :-)

	Jan D.