From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: TTY Vertical divider face? Date: Tue, 28 Jun 2005 02:54:45 +0300 Organization: JURTA Message-ID: <87zmtbflkn.fsf@jurta.org> References: <877jgroo1i.fsf@jurta.org> <87u0jr1xmd.fsf@jurta.org> <87mzpisgbe.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1119929371 13676 80.91.229.2 (28 Jun 2005 03:29:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2005 03:29:31 +0000 (UTC) Cc: snogglethorpe@gmail.com, emacs-devel@gnu.org, rms@gnu.org, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 28 05:29:28 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dn6m6-0008Tv-CR for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 05:28:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dn6tr-0002hG-Ex for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2005 23:36:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dn6m1-0006HT-VG for emacs-devel@gnu.org; Mon, 27 Jun 2005 23:28:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dn6lq-00069m-8m for emacs-devel@gnu.org; Mon, 27 Jun 2005 23:28:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dn6lj-00064b-Mq for emacs-devel@gnu.org; Mon, 27 Jun 2005 23:28:15 -0400 Original-Received: from [194.126.101.116] (helo=HOT-Bounce1.hot.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dn6m4-00066t-Tb; Mon, 27 Jun 2005 23:28:37 -0400 Original-Received: from mail.neti.ee (Relay4 [192.168.1.23]) by HOT-Bounce1.hot.ee (Postfix) with ESMTP id 9AD9714B2AC; Tue, 28 Jun 2005 06:10:49 +0300 (EEST) Original-Received: from mail.neti.ee (80-235-41-107-dsl.mus.estpak.ee [80.235.41.107]) by Relayhost2.neti.ee (Postfix) with ESMTP id 910911E3F; Tue, 28 Jun 2005 06:23:32 +0300 (EEST) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Thu, 23 Jun 2005 09:48:17 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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: news.gmane.org gmane.emacs.devel:39716 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39716 >> It makes sense to use the new `vertical-border' face not only >> for defining a vertical divider on character terminals, but also >> on X for defining the foreground color of the vertical thin line >> between windows. >> >> That seems natural. >> >> Is that line present even when there is a scroll bar? > > Yes. What about such a patch? I have tested it on GNU/Linux, but the change in w32term.c is untested. I hope someone will test it on Windows. Index: src/xterm.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/xterm.c,v retrieving revision 1.867 diff -c -r1.867 xterm.c *** src/xterm.c 6 Jun 2005 21:27:50 -0000 1.867 --- src/xterm.c 27 Jun 2005 23:09:09 -0000 *************** *** 535,540 **** --- 535,546 ---- int x, y0, y1; { struct frame *f = XFRAME (WINDOW_FRAME (w)); + struct face *face; + + face = FACE_FROM_ID (f, VERTICAL_BORDER_FACE_ID); + if (face) + XSetForeground (FRAME_X_DISPLAY (f), f->output_data.x->normal_gc, + face->foreground); XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), f->output_data.x->normal_gc, x, y0, x, y1); Index: src/w32term.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/w32term.c,v retrieving revision 1.225 diff -c -r1.225 w32term.c *** src/w32term.c 13 Jun 2005 12:18:31 -0000 1.225 --- src/w32term.c 27 Jun 2005 23:09:09 -0000 *************** *** 507,512 **** --- 507,513 ---- struct frame *f = XFRAME (WINDOW_FRAME (w)); RECT r; HDC hdc; + struct face *face; r.left = x; r.right = x + 1; *************** *** 514,520 **** r.bottom = y1; hdc = get_frame_dc (f); ! w32_fill_rect (f, hdc, FRAME_FOREGROUND_PIXEL (f), &r); release_frame_dc (f, hdc); } --- 515,526 ---- r.bottom = y1; hdc = get_frame_dc (f); ! face = FACE_FROM_ID (f, VERTICAL_BORDER_FACE_ID); ! if (face) ! w32_fill_rect (f, hdc, face->foreground, &r); ! else ! w32_fill_rect (f, hdc, FRAME_FOREGROUND_PIXEL (f), &r); ! release_frame_dc (f, hdc); } -- Juri Linkov http://www.jurta.org/emacs/