From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Problem with modeline and window margins Date: Thu, 20 Jan 2005 14:06:20 +0100 Message-ID: References: <1957.220.255.79.102.1106217674.squirrel@220.255.79.102> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106227184 21682 80.91.229.6 (20 Jan 2005 13:19:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Jan 2005 13:19:44 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 20 14:19:38 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CrcDp-0002BX-00 for ; Thu, 20 Jan 2005 14:19:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CrcPp-0001Gr-UO for ged-emacs-devel@m.gmane.org; Thu, 20 Jan 2005 08:32:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CrcKi-0007xa-2s for emacs-devel@gnu.org; Thu, 20 Jan 2005 08:26:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CrcKe-0007vT-TA for emacs-devel@gnu.org; Thu, 20 Jan 2005 08:26:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CrcKd-0007rE-65 for emacs-devel@gnu.org; Thu, 20 Jan 2005 08:26:39 -0500 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1Crc0t-0000vN-JE for emacs-devel@gnu.org; Thu, 20 Jan 2005 08:06:15 -0500 Original-Received: (qmail 53806 invoked from network); 20 Jan 2005 13:06:14 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 20 Jan 2005 13:06:14 -0000 Original-To: "Chong Yidong" In-Reply-To: <1957.220.255.79.102.1106217674.squirrel@220.255.79.102> (Chong Yidong's message of "Thu, 20 Jan 2005 05:41:14 -0500 (EST)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) 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: main.gmane.org gmane.emacs.devel:32417 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32417 "Chong Yidong" writes: > Regarding the following item from FOR_RELEASE: > >> ** Problem with modeline and window margins: >> >> The mode line's right "box" line is misplaced under the right margin, >> rather than at the right window edge. >> >> emacs -Q >> (set-window-margins nil 25 25) >> C-x 2 > > The problem seems to be that x_draw_glyph_string_box finds the right-hand > edge of the box by calling window_box_right. However, the value returned > by window_box_right stops at the right margin (see the definition of > window_box_width.) Thank you very much for tracking this down -- it has been bugging me for a while. Your patch looks ok, but I think it can be done simpler. Can you try this patch instead: *** xterm.c 01 Jan 2005 13:35:03 +0100 1.855 --- xterm.c 20 Jan 2005 13:56:13 +0100 *************** *** 2127,2141 **** struct glyph *last_glyph; XRectangle clip_rect; - last_x = window_box_right (s->w, s->area); if (s->row->full_width_p && !s->w->pseudo_window_p) ! { ! last_x += WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w); ! if (s->area != RIGHT_MARGIN_AREA ! || WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (s->w)) ! last_x += WINDOW_RIGHT_FRINGE_WIDTH (s->w); ! } /* The glyph that may have a right box line. */ last_glyph = (s->cmp || s->img --- 2127,2137 ---- struct glyph *last_glyph; XRectangle clip_rect; if (s->row->full_width_p && !s->w->pseudo_window_p) ! last_x = WINDOW_RIGHT_EDGE_X (s->w); ! else ! last_x = window_box_right (s->w, s->area); /* The glyph that may have a right box line. */ last_glyph = (s->cmp || s->img -- Kim F. Storm http://www.cua.dk