From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu 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 07:13:32 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <87iq81hhyl.fsf@stupidchicken.com> <8q634168ku.fsf@fencepost.gnu.org> <4BBF5CCB.8000006@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1270853453 4501 80.91.229.12 (9 Apr 2010 22:50:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 9 Apr 2010 22:50:53 +0000 (UTC) Cc: 5908@debbugs.gnu.org, Chong Yidong , D Chiesa To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 10 00:50:51 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 1O0N2H-0002Lk-RM for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Apr 2010 00:50:50 +0200 Original-Received: from localhost ([127.0.0.1]:50677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0MiG-0001tt-3E for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Apr 2010 18:30:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0MhB-0001Yb-8V for bug-gnu-emacs@gnu.org; Fri, 09 Apr 2010 18:29:01 -0400 Original-Received: from [140.186.70.92] (port=37722 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Mh3-0001Jz-Bt for bug-gnu-emacs@gnu.org; Fri, 09 Apr 2010 18:29:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0Mgq-0006FR-7m for bug-gnu-emacs@gnu.org; Fri, 09 Apr 2010 18:28:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55830) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0Mgq-0006FL-3e for bug-gnu-emacs@gnu.org; Fri, 09 Apr 2010 18:28:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O0MSg-0002ft-LW; Fri, 09 Apr 2010 18:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Apr 2010 22:14: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.127085122210274 (code B ref 5908); Fri, 09 Apr 2010 22:14:02 +0000 Original-Received: (at 5908) by debbugs.gnu.org; 9 Apr 2010 22:13:42 +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 1O0MSM-0002ff-94 for submit@debbugs.gnu.org; Fri, 09 Apr 2010 18:13:42 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0MSI-0002fa-IR for 5908@debbugs.gnu.org; Fri, 09 Apr 2010 18:13:40 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 11E81C0557; Sat, 10 Apr 2010 07:13:33 +0900 (JST) In-Reply-To: <4BBF5CCB.8000006@swipnet.se> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 =?UTF-8?Q?(Shij=C5=8D)?= APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 09 Apr 2010 18:14: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:36136 Archived-At: >>>>> 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 =20 + /* Flags passed to try_window. */ + #define TRY_WINDOW_CHECK_MARGINS (1 << 0) + #define TRY_WINDOW_IGNORE_FONTS_CHANGE (1 << 1) +=20 /* Defined in fringe.c */ =20 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. */ =20 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.) */ =20 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; } =20 /* 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; } =20 /* 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); =20 /* 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_CHANGE); =20 /* Compute width and height of the tooltip. */ width =3D height =3D 0;