From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bug#5703: 23.1.92; `x-show-tip' and `tooltip-frame-parameters' do not respect `left' and `top' Date: Wed, 31 Mar 2010 12:17:19 +0300 Message-ID: <83aatozw80.fsf@gnu.org> References: <87pr38rnan.fsf@stupidchicken.com> <83pr2mympy.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1270027235 30118 80.91.229.12 (31 Mar 2010 09:20:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 31 Mar 2010 09:20:35 +0000 (UTC) Cc: cyd@stupidchicken.com, 5703-done@debbugs.gnu.org, jasonr@gnu.org, emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 31 11:20:31 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwu67-0000nr-Uo for ged-emacs-devel@m.gmane.org; Wed, 31 Mar 2010 11:20:28 +0200 Original-Received: from localhost ([127.0.0.1]:56336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwu67-0004pG-68 for ged-emacs-devel@m.gmane.org; Wed, 31 Mar 2010 05:20:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nwu3U-0003qK-9C for emacs-devel@gnu.org; Wed, 31 Mar 2010 05:17:44 -0400 Original-Received: from [140.186.70.92] (port=35440 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwu3R-0003oa-RJ for emacs-devel@gnu.org; Wed, 31 Mar 2010 05:17:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nwu3Q-0000cl-D4 for emacs-devel@gnu.org; Wed, 31 Mar 2010 05:17:41 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:54479) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwu3Q-0000cL-4P; Wed, 31 Mar 2010 05:17:40 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L0500K002YEGW00@a-mtaout22.012.net.il>; Wed, 31 Mar 2010 12:17:11 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.176.135]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L0500JNO34LNE30@a-mtaout22.012.net.il>; Wed, 31 Mar 2010 12:17:10 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:122960 Archived-At: > Date: Wed, 31 Mar 2010 08:33:25 +0900 > From: YAMAMOTO Mitsuharu > Cc: Chong Yidong , emacs-devel@gnu.org, > 5703@debbugs.gnu.org, jasonr@gnu.org > > > I see almost identical code in xfns.c versions of these functions, > > so I'd be interested to hear how come the X version does not suffer > > from the same problem. That's because the patch below, although it > > does the job, feels a bit kludgey, and I wonder if there a cleaner > > way. > > Because x_create_tip_frame in xfns.c makes a copy of `parms'? Right, I missed that. Thanks. So I committed to the emacs-23 branch the following patch which fixes the bug: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-03-31 04:00:23 +0000 +++ src/ChangeLog 2010-03-31 09:08:40 +0000 @@ -1,3 +1,8 @@ +2010-03-31 Eli Zaretskii + + * w32fns.c (x_create_tip_frame): Copy `parms' before we modify it + in this function. (Bug#5703) + 2010-03-31 Chong Yidong * nsterm.h: Fix last change. === modified file 'src/w32fns.c' --- src/w32fns.c 2010-01-13 08:35:10 +0000 +++ src/w32fns.c 2010-03-31 09:08:40 +0000 @@ -5427,6 +5427,10 @@ x_create_tip_frame (dpyinfo, parms, text kb = dpyinfo->terminal->kboard; + /* The calls to x_get_arg remove elements from PARMS, so copy it to + avoid destructive changes behind our caller's back. */ + parms = Fcopy_alist (parms); + /* Get the name of the frame to use for resource lookup. */ name = x_get_arg (dpyinfo, parms, Qname, "name", "Name", RES_TYPE_STRING); if (!STRINGP (name)