From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: [patch] use proper color when drawing border of non-toolkit scroll bars Date: Fri, 02 Feb 2007 11:33:14 +0100 Message-ID: <45C3136A.3090209@swipnet.se> References: <87r6tdv4rs.fsf@gate450.dyndns.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1170412426 6712 80.91.229.12 (2 Feb 2007 10:33:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Feb 2007 10:33:46 +0000 (UTC) Cc: david.hansen@physik.fu-berlin.de, emacs-devel@gnu.org To: Andreas Seltenreich Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 02 11:33:39 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HCvje-0001Fl-EA for ged-emacs-devel@m.gmane.org; Fri, 02 Feb 2007 11:33:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCvje-0002bG-1j for ged-emacs-devel@m.gmane.org; Fri, 02 Feb 2007 05:33:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCvjP-0002bB-Or for emacs-devel@gnu.org; Fri, 02 Feb 2007 05:33:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCvjN-0002ay-4G for emacs-devel@gnu.org; Fri, 02 Feb 2007 05:33:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCvjM-0002av-Ul for emacs-devel@gnu.org; Fri, 02 Feb 2007 05:33:20 -0500 Original-Received: from av7-2-sn3.vrr.skanova.net ([81.228.9.182]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HCvjM-00035I-2s for emacs-devel@gnu.org; Fri, 02 Feb 2007 05:33:20 -0500 Original-Received: by av7-2-sn3.vrr.skanova.net (Postfix, from userid 502) id 2B48938571; Fri, 2 Feb 2007 11:32:52 +0100 (CET) Original-Received: from smtp3-2-sn3.vrr.skanova.net (smtp3-2-sn3.vrr.skanova.net [81.228.9.102]) by av7-2-sn3.vrr.skanova.net (Postfix) with ESMTP id 059C838375; Fri, 2 Feb 2007 11:32:52 +0100 (CET) Original-Received: from husetbladh.homeip.net (81-235-205-78-no59.tbcn.telia.com [81.235.205.78]) by smtp3-2-sn3.vrr.skanova.net (Postfix) with ESMTP id E16F637E44; Fri, 2 Feb 2007 11:33:18 +0100 (CET) User-Agent: Thunderbird 1.5.0.9 (X11/20070103) In-Reply-To: <87r6tdv4rs.fsf@gate450.dyndns.org> X-detected-kernel: Linux 2.4-2.6 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:65761 Archived-At: Andreas Seltenreich skrev: > Hi, > > the border of non-toolkit scroll bars seems to ignore attempts to > customize it via the scroll-bar-foreground frame parameter or the > scroll-bar face. Attached is a trivial patch to fix it, although I'm > not really sure if it qualifies as a bug. Applied, thanks. FWIW, I think it is a bug. Jan D. > > regards, > andreas > > Index: ChangeLog > =================================================================== > RCS file: /sources/emacs/emacs/src/ChangeLog,v > retrieving revision 1.5527 > diff -c -0 -r1.5527 ChangeLog > *** ChangeLog 29 Jan 2007 17:06:15 -0000 1.5527 > --- ChangeLog 29 Jan 2007 22:18:56 -0000 > *************** > *** 0 **** > --- 1,6 ---- > + 2007-01-29 Andreas Seltenreich > + > + * xterm.c [!USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_expose): Use > + the foreground color of the scroll-bar face when drawing the > + scroll-bar's border. > + > Index: xterm.c > =================================================================== > RCS file: /sources/emacs/emacs/src/xterm.c,v > retrieving revision 1.938 > diff -c -r1.938 xterm.c > *** xterm.c 21 Jan 2007 04:18:14 -0000 1.938 > --- xterm.c 29 Jan 2007 22:19:08 -0000 > *************** > *** 5279,5284 **** > --- 5279,5289 ---- > > x_scroll_bar_set_handle (bar, XINT (bar->start), XINT (bar->end), 1); > > + /* Switch to scroll bar foreground color. */ > + if (f->output_data.x->scroll_bar_foreground_pixel != -1) > + XSetForeground (FRAME_X_DISPLAY (f), gc, > + f->output_data.x->scroll_bar_foreground_pixel); > + > /* Draw a one-pixel border just inside the edges of the scroll bar. */ > XDrawRectangle (FRAME_X_DISPLAY (f), w, gc, > > *************** > *** 5287,5292 **** > --- 5292,5302 ---- > XINT (bar->width) - 1 - width_trim - width_trim, > XINT (bar->height) - 1); > > + /* Restore the foreground color of the GC if we changed it above. */ > + if (f->output_data.x->scroll_bar_foreground_pixel != -1) > + XSetForeground (FRAME_X_DISPLAY (f), gc, > + f->output_data.x->foreground_pixel); > + > UNBLOCK_INPUT; > > } > > > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel