From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#52324: 29.0.50; "Padded" mode line lacks uniform border Date: Sat, 11 Dec 2021 15:47:24 +0200 Message-ID: <837dcbqmmr.fsf@gnu.org> References: <877dciyusl.fsf@protesilaos.com> <83k0gh23ka.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21545"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52324@debbugs.gnu.org, info@protesilaos.com To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 11 14:48:26 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mw2jh-0005QV-El for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Dec 2021 14:48:25 +0100 Original-Received: from localhost ([::1]:50194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mw2jf-0001O7-6P for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Dec 2021 08:48:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mw2jK-0001Ma-QV for bug-gnu-emacs@gnu.org; Sat, 11 Dec 2021 08:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37264) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mw2jK-00048l-I4 for bug-gnu-emacs@gnu.org; Sat, 11 Dec 2021 08:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mw2jK-0005Xv-Cs for bug-gnu-emacs@gnu.org; Sat, 11 Dec 2021 08:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Dec 2021 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52324 X-GNU-PR-Package: emacs Original-Received: via spool by 52324-submit@debbugs.gnu.org id=B52324.163923046521297 (code B ref 52324); Sat, 11 Dec 2021 13:48:02 +0000 Original-Received: (at 52324) by debbugs.gnu.org; 11 Dec 2021 13:47:45 +0000 Original-Received: from localhost ([127.0.0.1]:48810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mw2j3-0005XR-11 for submit@debbugs.gnu.org; Sat, 11 Dec 2021 08:47:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mw2iz-0005XB-1U for 52324@debbugs.gnu.org; Sat, 11 Dec 2021 08:47:44 -0500 Original-Received: from [2001:470:142:3::e] (port=60000 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mw2it-0003qx-IB; Sat, 11 Dec 2021 08:47:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sbzCBbofEMha7dXVQ4w3GxuKy+/UPfgSck5McfPlI9E=; b=mvwHOeiVRQNl srLvUeG92rrolosGc/1Uc4eSh2UlQDpk6JJqU/VLK0Iz+DOaxPyDKPRDZ3vQrsML2QYp9Ulgjf603 n2VNQl9mK1XqSPMizxopEmiljyGx93urycy05WczZvmnvtZ1b8swwMBbURCQW+x2eotPe4tL46BT3 wIIlrS6EeYuDRVjxu8Qb5dNpHQDUbYOZcuU1Bs+ui7WJBWMYDFsVJPNojCRsQaJB+tu1RCqQAUbMB rYwSxJYhNx/c30nSb6++9XWgFaStxiiqFdTvm5OtiHqo86ivK/rlnGfYRqpdYZ0KPBaPv0ZWCBUvG NYys1H03c9wu2Z3WR0yvEw==; Original-Received: from [87.69.77.57] (port=3864 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mw2it-00032h-Ck; Sat, 11 Dec 2021 08:47:35 -0500 In-Reply-To: <83k0gh23ka.fsf@gnu.org> (message from Eli Zaretskii on Mon, 06 Dec 2021 16:47:17 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222121 Archived-At: > Date: Mon, 06 Dec 2021 16:47:17 +0200 > From: Eli Zaretskii > Cc: 52324@debbugs.gnu.org > > > From: Protesilaos Stavrou > > Date: Mon, 06 Dec 2021 10:58:02 +0200 > > > > In an emacs -Q session with version 27 we could evaluate the following > > to make the mode line look more spacious ("padded", so to speak): > > > > (setq x-underline-at-descent-line t) > > > > (set-face-attribute 'mode-line nil > > :foreground "black" > > :background "gray80" > > :box '(:line-width 6 :color "gray80") > > :overline "gray30" > > :underline "gray30" > > :distant-foreground 'unspecified) > > > > Whereas with master, the same results in a box with interrupted lines. > > This seems to be a general bug regarding display of stretches of > whitespace with overline and underline. In Emacs 27, after evaluating > the above settings, try this: > > M-: (setq mode-line-format "%b %p HELLO") RET > > where the whitespace between %b and %p is 2 TAB characters. you will > see that the stretch glyph produced for the TABs lacks the overline > and underline in Emacs 27 as well. > > So this is not a bug introduced by the recent changes in the mode > line, it is a bug that was always in Emacs, and those recent changes > just exposed it. > > I'll try to dig into this when I have time. Lu, can you help? This has something to do with clipping, because the overline disappears in this call to x_reset_clip_rectangles at the end of x_draw_glyph_string: /* Reset clipping. */ x_reset_clip_rectangles (s->f, s->gc); <<<<<<<<<<<<<<<<<<<<<<<<< s->num_clips = 0; Before that call, I see the overline and underline of the stretch glyph on the mode line as expected. But I cannot understand what is missing to avoid this removal of the overline and underline.