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.devel Subject: Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X Date: Mon, 10 Jan 2022 19:47:36 +0200 Message-ID: <8335lva3ev.fsf@gnu.org> References: <164181573002.27254.10999604516337949526@vcs2.savannah.gnu.org> <20220110115530.E4B34C0DA1D@vcs2.savannah.gnu.org> <87zgo3pzu3.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10833"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 10 18:48:49 2022 Return-path: Envelope-to: ged-emacs-devel@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 1n6yml-0002a6-6D for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Jan 2022 18:48:47 +0100 Original-Received: from localhost ([::1]:47098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6ymj-0006M3-TX for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Jan 2022 12:48:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ylq-0005em-Jh for emacs-devel@gnu.org; Mon, 10 Jan 2022 12:47:50 -0500 Original-Received: from [2001:470:142:3::e] (port=52278 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 1n6ylm-0005XX-La; Mon, 10 Jan 2022 12:47:50 -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=GGKRpCdzRxuatnSfJuJvrn1WaZ082ZmGwyMUv2gX5uk=; b=AwQqmA7q2jY7 Qc57Xd34y7e5w0yUvgj7qKW1BOvFwHHxW1k3SU+eYt2/GiI5/6kd4+ykFNQQYnrRAXP7vSXc359ao 5b4DnIE7MHLKwrtiRdy6pKMP7vOn49Y4j27/aKz21gIeYhApxHvbDxnpsnJFgjr1xsyoYwvSFFaTy YyARU0DzqbFmbBrwGeR++IMMhe9FKwkRM9eib/y478l8rvaM2FVMDoF9bQIKgL9pupQ25N+NZl9Xb IufKk1T3AkQHH8k7LggwtsNhA/jw6mUlmGgVTWUvupCiERVyouuEpU21jb7mnkJghNbiYdJ5TTc0p JIGdcNIFvDDGMomcAeF77w==; Original-Received: from [87.69.77.57] (port=3975 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 1n6ylm-0003jS-4i; Mon, 10 Jan 2022 12:47:47 -0500 In-Reply-To: <87zgo3pzu3.fsf@yahoo.com> (message from Po Lu on Mon, 10 Jan 2022 19:58:12 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284543 Archived-At: > From: Po Lu > Date: Mon, 10 Jan 2022 19:58:12 +0800 > > Po Lu via Mailing list for Emacs changes writes: > > > Prevent text decorations from overwriting surrounding areas on X > > > > * src/xterm.c (x_draw_underwave): New parameter > > `decoration_width'. > > (x_draw_glyph_string): Constrain decoration width to current > > text area. > > This happens on X because nothing actually clips the decoration to the > string's area when we draw the decoration. I'm not sure I understand what clipping did you have in mind. In x_draw_underwave, for example, we have this: /* Find and set clipping rectangle */ wave_clip.x = x0; wave_clip.y = y0; wave_clip.width = width; wave_clip.height = wave_height; get_glyph_string_clip_rect (s, &string_clip); if (!gui_intersect_rectangles (&wave_clip, &string_clip, &final_clip)) return; XSetClipRectangles (display, s->gc, 0, 0, &final_clip, 1, Unsorted); Isn't this the clipping? Or what am I missing? > You can test by running custom-set-faces on default, enabling an > underline or overline, and typing in a field that is extended to the end > of the line. Please show some actual Lisp to try this, so we wouldn't need to guess whether the problem doesn't exist or we failed to reproduce correctly.