unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "Peter Münster" <pmrb@free.fr>, 17163@debbugs.gnu.org
Subject: bug#17163: 24.3.50; default-frame-alist: scroll-bar-width not used
Date: Wed, 02 Apr 2014 16:38:17 +0200	[thread overview]
Message-ID: <533C20D9.1000505@gmx.at> (raw)
In-Reply-To: <87mwg4n9wj.fsf@micropit.couberia.selfip.net>

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

 > The value of scroll-bar-width is used only in the first frame.
 >
 > 1.) Create file /tmp/init.el:
 >
 > --8<---------------cut here---------------start------------->8---
 > (set-face-attribute 'default nil :height 150)
 > (setq default-frame-alist '((scroll-bar-width . 10)))
 > (make-frame-command)
 > (print default-frame-alist)
 > --8<---------------cut here---------------end--------------->8---
 >
 > 2.) Start emacs:
 >
 > emacs -Q -l /tmp/init.el
 >
 > 3.) Compare the widths of the scroll-bars.

Should be fixed with revision 116894 on the Emacs-24 release branch.

If you are on trunk you will either have to wait until the fix
propagates or try the attached diffs.

Thanks for the report, martin

[-- Attachment #2: xterm.diff --]
[-- Type: text/plain, Size: 1792 bytes --]

=== modified file 'src/xterm.c'
*** src/xterm.c	2014-03-11 06:50:01 +0000
--- src/xterm.c	2014-04-02 13:13:56 +0000
***************
*** 7766,7785 ****
  
    compute_fringe_widths (f, 1);
  
    unit = FRAME_COLUMN_WIDTH (f);
! #ifdef USE_TOOLKIT_SCROLL_BARS
!   /* The width of a toolkit scrollbar does not change with the new
!      font but we have to calculate the number of columns it occupies
!      anew.  */
!   FRAME_CONFIG_SCROLL_BAR_COLS (f)
!     = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit;
! #else
!   /* The width of a non-toolkit scrollbar is at least 14 pixels and a
!      multiple of the frame's character width.  */
!   FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit;
!   FRAME_CONFIG_SCROLL_BAR_WIDTH (f)
!     = FRAME_CONFIG_SCROLL_BAR_COLS (f) * unit;
! #endif  
  
    if (FRAME_X_WINDOW (f) != 0)
      {
--- 7766,7781 ----
  
    compute_fringe_widths (f, 1);
  
+   /* Compute character columns occupied by scrollbar.
+ 
+      Don't do things differently for non-toolkit scrollbars
+      (Bug#17163).  */
    unit = FRAME_COLUMN_WIDTH (f);
!   if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0)
!     FRAME_CONFIG_SCROLL_BAR_COLS (f)
!       = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit;
!   else
!     FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit;
  
    if (FRAME_X_WINDOW (f) != 0)
      {
***************
*** 7985,7991 ****
      {
  #ifdef HAVE_X11R6_XIM
        struct xim_inst_t *xim_inst = dpyinfo->xim_callback_data;
!       
        if (dpyinfo->display)
  	{
  	  Bool ret = XUnregisterIMInstantiateCallback
--- 7981,7987 ----
      {
  #ifdef HAVE_X11R6_XIM
        struct xim_inst_t *xim_inst = dpyinfo->xim_callback_data;
! 
        if (dpyinfo->display)
  	{
  	  Bool ret = XUnregisterIMInstantiateCallback


  reply	other threads:[~2014-04-02 14:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 19:10 bug#17163: 24.3.50; default-frame-alist: scroll-bar-width not used Peter Münster
2014-04-02 14:38 ` martin rudalics [this message]
2014-09-19  8:19   ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=533C20D9.1000505@gmx.at \
    --to=rudalics@gmx.at \
    --cc=17163@debbugs.gnu.org \
    --cc=pmrb@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).