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: x-popup-menu pops up at funny positions Date: Mon, 6 Jan 2003 19:41:11 +0100 (CET) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200301061942.h06Jgae0010061@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 1041963764 12845 80.91.224.249 (7 Jan 2003 18:22:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 7 Jan 2003 18:22: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 18VyN7-0003Kv-00 for ; Tue, 07 Jan 2003 19:22:41 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18VyRn-0001iZ-00 for ; Tue, 07 Jan 2003 19:27:31 +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 18Vy4s-000420-00 for emacs-devel@quimby.gnus.org; Tue, 07 Jan 2003 13:03:50 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18VcKW-00018y-00 for emacs-devel@gnu.org; Mon, 06 Jan 2003 13:50:32 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18VcK3-0000wE-00 for emacs-devel@gnu.org; Mon, 06 Jan 2003 13:50:10 -0500 Original-Received: from stubby.bodenonline.com ([193.201.16.94]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18VcHK-0000Sl-00; Mon, 06 Jan 2003 13:47:14 -0500 Original-Received: from accessno42.bodenonline.com (IDENT:root@accessno42.bodenonline.com [193.201.16.44]) h06Jgae0010061; Mon, 6 Jan 2003 20:42:37 +0100 In-Reply-To: "from Richard Stallman at Jan 6, 2003 12:13:02 pm" Original-To: 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:10527 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10527 > > Instead of just deleting that code, can you replace it with code > > that does the right job? > > I did that. The additions to x/y before assigning them to dummy.root_x/y. > > We are miscommunicating. "The job" I'm talking about is to read the > current position. I'm asking you to correct the code to read the > current position, instead of deleting it. I could add a call to x_real_positions. Any correction would look exactly like the code in x_real_positions. > You're claiming that the current position is always accurate, so there > is no need to read it. That might be true, but without being able to > prove this to ourselves informally, I don't think we should rely on it. How about this: There is no way to move a window in X without getting a ConfigureNotify (disregarding buggy X servers, which we can't compensate for anyway). The code for ConfigureNotify updates the real position by calling x_real_positions. So if Emacs gets to the case ConfigureNotify: in the event switch, the position is correct. Can we get a ConfigureNotify without hitting the case ConfigureNotify: code? Yes, if we are doing a recursive X event loop. There are two such instances, one in xmenu.c, popup_get_selection and one in xfns.c, Fx_file_dialog. The solution suggested is to take advantage of the split that the GTK patch does, so the case ConfigureNotify code is executed even for recursive X event loops. > So how about writing code to read the current position, compare it > with the recorded position, and abort if they differ? That way > we will find out if it isn't always right. Abort sounds a bit drastic, how about popping up a dialog instead? Jan D.