From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Motif menu popups not working in CVS Date: Mon, 6 Jan 2003 01:08:18 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v482) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1041811844 21775 80.91.224.249 (6 Jan 2003 00:10:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 6 Jan 2003 00:10:44 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18VKqZ-0005eZ-00 for ; Mon, 06 Jan 2003 01:10:27 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18VKuO-0002LT-00 for ; Mon, 06 Jan 2003 01:14:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18VKq3-000740-04 for emacs-devel@quimby.gnus.org; Sun, 05 Jan 2003 19:09:55 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18VKpg-0006vN-00 for emacs-devel@gnu.org; Sun, 05 Jan 2003 19:09:32 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18VKpP-0006O2-00 for emacs-devel@gnu.org; Sun, 05 Jan 2003 19:09:16 -0500 Original-Received: from stubby.bodenonline.com ([193.201.16.94]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18VKpM-0006Iy-00; Sun, 05 Jan 2003 19:09:13 -0500 Original-Received: from accessno42.bodenonline.com (IDENT:root@accessno42.bodenonline.com [193.201.16.44]) h0614cdw028769; Mon, 6 Jan 2003 02:04:38 +0100 Original-To: rms@gnu.org In-Reply-To: X-Mailer: Apple Mail (2.482) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10515 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10515 s=F6ndagen den 5 januari 2003 kl 19.33 skrev Richard Stallman: > It is some sort of race condition here, it seems that > popup_get_selection exits and removes the popup before Motif has > had a chance to invoke its callback for the menu item. Lucid > menus work OK. > > That is strange. Where is popup_activated_flag getting cleared > in the case that fails? In the if-branch for ButtonRelease. It may be that Motif does not calls the activate callback directly on the ButtonRelease event. > The only events that do get saved are EnterNotify, LeaveNotify, > FocusOut, FocusIn and MotionNotify. Losing these is no big deal, = since > the menu has the pointer and keyboard grabbed anyway. > > Could you explain that reasoning? I don't see how the conclusion > follows. I'm sure the code was added to solve a problem. I'm sure it was, but I am not sure the problem remains. Since the popup/dialog has a grab, a FocusOut and Leave is generated when the popup/dialog is posted. A new FocusIn and Enter notify will be generated when the popup/dialog is removed (if Emacs gets the focus), so keeping track of what happend in between is not useful, it is just the final state that is interesting. In fact, a common optimization is to compress Enter-Leave sequences that occur quickly after each other (GTK does this). The MotionNotify events will have the popup/dialog window in the event, since a grab has been done, so there will be no action for these events anyway when they are replayed. Jan D.