* bug#17163: 24.3.50; default-frame-alist: scroll-bar-width not used
@ 2014-04-01 19:10 Peter Münster
2014-04-02 14:38 ` martin rudalics
0 siblings, 1 reply; 3+ messages in thread
From: Peter Münster @ 2014-04-01 19:10 UTC (permalink / raw)
To: 17163
Hi,
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.
Further details:
In GNU Emacs 24.3.50.2 (x86_64-suse-linux-gnu, GTK+ Version 3.10.4)
of 2014-03-16 on micropit
Repository revision: 116774 rudalics@gmx.at-20140316092658-lcj8z20iwmnoshm3
Windowing system distributor `The X.Org Foundation', version 11.0.11403901
System Description: openSUSE 13.1 (Bottle) (x86_64)
Configured using:
`configure --without-toolkit-scroll-bars'
Important settings:
value of $LC_CTYPE: en_GB.utf8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
--
Peter
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#17163: 24.3.50; default-frame-alist: scroll-bar-width not used
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
2014-09-19 8:19 ` martin rudalics
0 siblings, 1 reply; 3+ messages in thread
From: martin rudalics @ 2014-04-02 14:38 UTC (permalink / raw)
To: Peter Münster, 17163
[-- 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-19 8:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-09-19 8:19 ` martin rudalics
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).