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 14:28:47 +0100 (CET) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200301061424.h06EObdw004015@stubby.bodenonline.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1042002339 22257 80.91.224.249 (8 Jan 2003 05:05:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2003 05:05:39 +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 18W8PK-0005mr-00 for ; Wed, 08 Jan 2003 06:05:38 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18W8UD-0008Bc-00 for ; Wed, 08 Jan 2003 06:10:41 +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 18Vxgi-0001a1-04 for emacs-devel@quimby.gnus.org; Tue, 07 Jan 2003 12:38:52 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18VZQG-0001R8-00 for emacs-devel@gnu.org; Mon, 06 Jan 2003 10:44:16 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18VYyI-00065D-00 for emacs-devel@gnu.org; Mon, 06 Jan 2003 10:15:25 -0500 Original-Received: from gnudist.gnu.org ([199.232.41.7]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18VYSj-0001kD-00; Mon, 06 Jan 2003 09:42:45 -0500 Original-Received: from stubby.bodenonline.com ([193.201.16.94]) by gnudist.gnu.org with esmtp (Exim 4.10.13) id 18VXP4-0004JF-00; Mon, 06 Jan 2003 08:34:55 -0500 Original-Received: from accessno42.bodenonline.com (IDENT:root@accessno42.bodenonline.com [193.201.16.44]) h06EObdw004015; Mon, 6 Jan 2003 15:24:38 +0100 In-Reply-To: "from Jan D. at Jan 6, 2003 01:08:18 am" Original-To: "Jan D." Original-cc: rms@gnu.org 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:10562 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10562 > > > 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. We can do this even better. The GTK port splits XTread_socket in to two functions, one that loops and one that handles one event. We can make a new function, x_dispatch_event, that calls the function that handles one event, and use x_dispatch_event instead of XtDispatchEvent. Then we definitly can remove the saving and reinsertions of event. process_expose_from_menu function can be removed also. If we use this for the Motif file selection dialog, we get the added bonus that expose of the frame under the dialog is handeled much better. Now, it relies on a signal getting trough in a short space of time, and if that time frame is missed, a redraw does not get done. Jan D.