From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: Hint on Xaw3d scroll bar colors issue [Was: Re: Changes in frame/window code] Date: Tue, 29 Jul 2014 15:27:00 +0400 Message-ID: <53D78504.8090307@yandex.ru> References: <53CE6A44.1010708@gmx.at> <53D4FF76.1060804@gmx.at> <8338dmj1of.fsf@gnu.org> <83wqayhe0o.fsf@gnu.org> <53D542B3.20206@gmx.at> <53D5D618.4070302@yandex.ru> <53D61765.6090705@gmx.at> <53D694FF.906@yandex.ru> <53D7679A.4010005@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1406633274 25917 80.91.229.3 (29 Jul 2014 11:27:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jul 2014 11:27:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 29 13:27:45 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XC5ZJ-0002Jx-Ae for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2014 13:27:45 +0200 Original-Received: from localhost ([::1]:44889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC5ZI-0002mY-RV for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2014 07:27:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC5Z7-0002bR-Sx for emacs-devel@gnu.org; Tue, 29 Jul 2014 07:27:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XC5Z0-0005JD-2W for emacs-devel@gnu.org; Tue, 29 Jul 2014 07:27:33 -0400 Original-Received: from forward8l.mail.yandex.net ([84.201.143.141]:54446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC5Yz-0005Et-MI for emacs-devel@gnu.org; Tue, 29 Jul 2014 07:27:26 -0400 Original-Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [37.140.190.26]) by forward8l.mail.yandex.net (Yandex) with ESMTP id 334CB1A40DB8; Tue, 29 Jul 2014 15:27:20 +0400 (MSK) Original-Received: from smtp1o.mail.yandex.net (localhost [127.0.0.1]) by smtp1o.mail.yandex.net (Yandex) with ESMTP id C6120DE20F3; Tue, 29 Jul 2014 15:27:19 +0400 (MSK) Original-Received: from 165.gprs.mts.ru (165.gprs.mts.ru [213.87.132.165]) by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id naZioX8TOg-RBoCLGV5; Tue, 29 Jul 2014 15:27:17 +0400 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: f6ffabf1-2ebc-495e-b0db-454442502f52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1406633239; bh=+M3fWXTgN5K/2nPDRn3XqQhLhUULCvINArs56C6nOQ4=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=hMNflU8CZHp+Z6jQZ8RrJElmixhHaimwZEDItxQqtNZcUNlZU81LDs6TDsJuOJlUp W+lXunk2CWhlcHPOR1Bo8t9wBBnpXGq4K1C/C/WtgGrkGzedKvtXzfY071enV+eoS8 mr6nB5mTNw4tBHL9ES3iqWl5QZcvsJFd7iCgRioE= Authentication-Results: smtp1o.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: <53D7679A.4010005@gmx.at> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.143.141 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173246 Archived-At: On 07/29/2014 01:21 PM, martin rudalics wrote: > Where can an ignorant like me find the sources (I'm on Debian)? Not sure about Debian. Usually there should be a kind of a debug package. On my Fedora 20 system, I have: Xaw3d-devel-1.6.2-5.fc20.x86_64 Xaw3d-1.6.2-5.fc20.x86_64 Xaw3d-debuginfo-1.6.2-5.fc20.x86_64 The last one installs Xaw3d sources under /usr/src/debug/libXaw3d-1.6.2, and gdb uses them while stepping through source code. Do you use Xaw3d or Xaw? If any, what version? If that matters, this is even more interesting debugging session: (gdb) b x_create_toolkit_scroll_bar Breakpoint 1 at 0x538f6c: file ../../trunk/src/xterm.c, line 4795. (gdb) b x_create_horizontal_toolkit_scroll_bar Breakpoint 2 at 0x5395a5: file ../../trunk/src/xterm.c, line 4994. (gdb) r -Q Breakpoint 1, x_create_toolkit_scroll_bar (f=0x1130ce0, bar=0x11c5998) at ../../trunk/src/xterm.c:4795 4795 int ac = 0; (gdb) b Xaw3dComputeTopShadowRGB Breakpoint 3 at 0x7ffff7da6690: file ThreeD.c, line 313. (gdb) b Xaw3dComputeBottomShadowRGB Breakpoint 4 at 0x7ffff7da6860: file ThreeD.c, line 359. (gdb) c Continuing. Breakpoint 3, Xaw3dComputeTopShadowRGB (new=new@entry=0xd0f220, xcol_out=xcol_out@entry=0x7fffffffa0d0) at ThreeD.c:313 313 { (gdb) n 314 if (XtIsSubclass (new, threeDWidgetClass)) { (gdb) 318 Display *dpy = XtDisplay (new); (gdb) 322 get_c.pixel = tdw->core.background_pixel; (gdb) p /x tdw->core.background_pixel $1 = 0xbfbfbf (gdb) c Continuing. Breakpoint 4, Xaw3dComputeBottomShadowRGB (new=new@entry=0xd0f220, xcol_out=xcol_out@entry=0x7fffffffa0d0) at ThreeD.c:359 359 { (gdb) n 360 if (XtIsSubclass (new, threeDWidgetClass)) { (gdb) 364 Display *dpy = XtDisplay (new); (gdb) 368 get_c.pixel = tdw->core.background_pixel; (gdb) p /x tdw->core.background_pixel $2 = 0xbfbfbf So, vertical scroll bar's Core widget has background pixel 0xbfbfbf. Next, we create horizontal scroll bar and see: Breakpoint 2, x_create_horizontal_toolkit_scroll_bar (f=0x1130ce0, bar=0x11c6908) at ../../trunk/src/xterm.c:4994 4994 int ac = 0; (gdb) c Continuing. Breakpoint 3, Xaw3dComputeTopShadowRGB (new=new@entry=0xbe6a70, xcol_out=xcol_out@entry=0x7fffffff93a0) at ThreeD.c:313 313 { (gdb) n 314 if (XtIsSubclass (new, threeDWidgetClass)) { (gdb) 318 Display *dpy = XtDisplay (new); (gdb) 322 get_c.pixel = tdw->core.background_pixel; (gdb) p /x tdw->core.background_pixel $3 = 0xffffff (gdb) c Continuing. Breakpoint 4, Xaw3dComputeBottomShadowRGB (new=new@entry=0xbe6a70, xcol_out=xcol_out@entry=0x7fffffff93a0) at ThreeD.c:359 359 { (gdb) n 360 if (XtIsSubclass (new, threeDWidgetClass)) { (gdb) 364 Display *dpy = XtDisplay (new); (gdb) 368 get_c.pixel = tdw->core.background_pixel; (gdb) p /x tdw->core.background_pixel $4 = 0xffffff Here Core's background pixel is 0xffffff and so colors calculated by Xaw3dComputeTopShadowRGB and Xaw3dComputeBottomShadowRGB for top_shadow_pixel and bot_shadow_pixel of our new shiny horizontal scroll bar are very different from the corresponding colors of vertical scroll bar. I can use gdb to set horizontal scroll bar Core's tdw->core.background_pixel to 0xbfbfbf and finally see horizontal scroll bar in an expected color. BTW, x_default_scroll_bar_color_parameter in xfns.c should take horizontal scroll bar into account, isn't it? Dmitry