From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#5908: tooltip-show breaks with multiline tip on Emacs for Windows v22.2.1 Date: Sat, 10 Apr 2010 08:45:04 +0200 Message-ID: <4BC01E70.6020605@swipnet.se> References: <87iq81hhyl.fsf@stupidchicken.com> <8q634168ku.fsf@fencepost.gnu.org> <4BBF5CCB.8000006@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1270883296 3353 80.91.229.12 (10 Apr 2010 07:08:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 10 Apr 2010 07:08:16 +0000 (UTC) Cc: 5908@debbugs.gnu.org, Chong Yidong , D Chiesa To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 10 09:08:14 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1O0Une-00087T-1R for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Apr 2010 09:08:14 +0200 Original-Received: from localhost ([127.0.0.1]:46157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Und-0004IK-Ds for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Apr 2010 03:08:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0Un0-00046y-4m for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2010 03:07:34 -0400 Original-Received: from [140.186.70.92] (port=47426 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Umn-0003gY-T0 for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2010 03:07:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0UeO-0004Ub-6m for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2010 02:58:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42389) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0UeO-0004US-4A for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2010 02:58:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O0USA-0005tB-Sw; Sat, 10 Apr 2010 02:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Apr 2010 06:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5908 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5908-submit@debbugs.gnu.org id=B5908.127088191222623 (code B ref 5908); Sat, 10 Apr 2010 06:46:02 +0000 Original-Received: (at 5908) by debbugs.gnu.org; 10 Apr 2010 06:45:12 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0URL-0005sq-VP for submit@debbugs.gnu.org; Sat, 10 Apr 2010 02:45:12 -0400 Original-Received: from smtprelay-b12.telenor.se ([62.127.194.21]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0URK-0005sl-1l for 5908@debbugs.gnu.org; Sat, 10 Apr 2010 02:45:11 -0400 Original-Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id 21A1BCDD0 for <5908@debbugs.gnu.org>; Sat, 10 Apr 2010 08:45:05 +0200 (CEST) X-SENDER-IP: [85.225.45.110] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhM4AIa7v0tV4S1uPGdsb2JhbACHZZNdDAEBAQE1LbhhhQoEjkA X-IronPort-AV: E=Sophos;i="4.52,181,1270418400"; d="scan'208";a="61859836" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by ipb2.telenor.se with ESMTP; 10 Apr 2010 08:45:05 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 12DBB7FA01A; Sat, 10 Apr 2010 08:45:05 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 10 Apr 2010 02:46:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36142 Archived-At: This looks cleaner, can you install it? Jan D. YAMAMOTO Mitsuharu skrev 2010-04-10 00.13: >>>>>> On Fri, 09 Apr 2010 18:58:51 +0200, Jan Dj=E4rv said: > >>> I though this was a duplicate of the (still open) bug#2423. Maybe >>> it was fixed and never closed, but I don't recall it. (Multiline >>> tooltips still don't work the first time in GNU/Linux.) > >> I have checked in a fix for multiline tooltips the first time for X. >> try_window aborts if fonts_changed_p is set, and the first time one >> loads the tip font, this is what happens. > > Or maybe we could introduce a flag for try_window to ignore > fonts_changed_p, because glyph matrices are not adjusted for the > tooltip case, anyway. > > YAMAMOTO Mitsuharu > mituharu@math.s.chiba-u.ac.jp > > =3D=3D=3D modified file 'src/dispextern.h' > *** src/dispextern.h 2010-03-22 07:26:56 +0000 > --- src/dispextern.h 2010-04-09 22:04:46 +0000 > *************** > *** 2831,2836 **** > --- 2831,2840 ---- > XRectangle *)); > #endif > > + /* Flags passed to try_window. */ > + #define TRY_WINDOW_CHECK_MARGINS (1<< 0) > + #define TRY_WINDOW_IGNORE_FONTS_CHANGE (1<< 1) > + > /* Defined in fringe.c */ > > int lookup_fringe_bitmap (Lisp_Object); > > =3D=3D=3D modified file 'src/xdisp.c' > *** src/xdisp.c 2010-04-05 15:46:29 +0000 > --- src/xdisp.c 2010-04-09 22:04:15 +0000 > *************** > *** 13603,13609 **** > =3D try_window_reusing_current_matrix (w))) > { > IF_DEBUG (debug_method_add (w, "1")); > ! if (try_window (window, startp, 1)< 0) > /* -1 means we need to scroll. > 0 means we need new matrices, but fonts_changed_p > is set in that case, so we will detect it below. */ > --- 13603,13609 ---- > =3D try_window_reusing_current_matrix (w))) > { > IF_DEBUG (debug_method_add (w, "1")); > ! if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS)< 0) > /* -1 means we need to scroll. > 0 means we need new matrices, but fonts_changed_p > is set in that case, so we will detect it below. */ > *************** > *** 13954,13966 **** > Value is 1 if successful. It is zero if fonts were loaded during > redisplay which makes re-adjusting glyph matrices necessary, and = -1 > if point would appear in the scroll margins. > ! (We check that only if CHECK_MARGINS is nonzero. */ > > int > ! try_window (window, pos, check_margins) > Lisp_Object window; > struct text_pos pos; > ! int check_margins; > { > struct window *w =3D XWINDOW (window); > struct it it; > --- 13954,13968 ---- > Value is 1 if successful. It is zero if fonts were loaded during > redisplay which makes re-adjusting glyph matrices necessary, and = -1 > if point would appear in the scroll margins. > ! (We check the former only if TRY_WINDOW_IGNORE_FONTS_CHANGE is > ! unset in FLAGS, and the latter only if TRY_WINDOW_CHECK_MARGINS is > ! set in FLAGS.) */ > > int > ! try_window (window, pos, flags) > Lisp_Object window; > struct text_pos pos; > ! int flags; > { > struct window *w =3D XWINDOW (window); > struct it it; > *************** > *** 13982,13993 **** > { > if (display_line (&it)) > last_text_row =3D it.glyph_row - 1; > ! if (fonts_changed_p) > return 0; > } > > /* Don't let the cursor end in the scroll margins. */ > ! if (check_margins > && !MINI_WINDOW_P (w)) > { > int this_scroll_margin; > --- 13984,13995 ---- > { > if (display_line (&it)) > last_text_row =3D it.glyph_row - 1; > ! if (fonts_changed_p&& !(flags& TRY_WINDOW_IGNORE_FONTS_CHANGE= )) > return 0; > } > > /* Don't let the cursor end in the scroll margins. */ > ! if ((flags& TRY_WINDOW_CHECK_MARGINS) > && !MINI_WINDOW_P (w)) > { > int this_scroll_margin; > > =3D=3D=3D modified file 'src/xfns.c' > *** src/xfns.c 2010-03-22 07:26:56 +0000 > --- src/xfns.c 2010-04-09 22:03:33 +0000 > *************** > *** 5196,5202 **** > clear_glyph_matrix (w->desired_matrix); > clear_glyph_matrix (w->current_matrix); > SET_TEXT_POS (pos, BEGV, BEGV_BYTE); > ! try_window (FRAME_ROOT_WINDOW (f), pos, 0); > > /* Compute width and height of the tooltip. */ > width =3D height =3D 0; > --- 5196,5202 ---- > clear_glyph_matrix (w->desired_matrix); > clear_glyph_matrix (w->current_matrix); > SET_TEXT_POS (pos, BEGV, BEGV_BYTE); > ! try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHA= NGE); > > /* Compute width and height of the tooltip. */ > width =3D height =3D 0;