diff options
| author | Martin Rudalics | 2014-04-02 16:33:33 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2014-04-02 16:33:33 +0200 |
| commit | ffcd5669d6a71dd9450a9c45b2ea67d3ddc7c988 (patch) | |
| tree | b631d7ca645c171c1f5c3e306304cee298efb1f5 | |
| parent | 0b908bf2ef8a755cc61425e181f8272e52bc5aaa (diff) | |
| download | emacs-ffcd5669d6a71dd9450a9c45b2ea67d3ddc7c988.tar.gz emacs-ffcd5669d6a71dd9450a9c45b2ea67d3ddc7c988.zip | |
In x_new_font don't calculate non-toolkit scrollbar width from font width (Bug#17163).
* xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
width from font width (Bug#17163).
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 24 |
2 files changed, 15 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4a761249376..18b643bfe28 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-04-02 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar | ||
| 4 | width from font width (Bug#17163). | ||
| 5 | |||
| 1 | 2014-03-30 Martin Rudalics <rudalics@gmx.at> | 6 | 2014-03-30 Martin Rudalics <rudalics@gmx.at> |
| 2 | 7 | ||
| 3 | * frame.c (x_set_frame_parameters): Calculate default values of | 8 | * frame.c (x_set_frame_parameters): Calculate default values of |
diff --git a/src/xterm.c b/src/xterm.c index 6fea807c975..ae16e589f62 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -7778,20 +7778,16 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset) | |||
| 7778 | 7778 | ||
| 7779 | compute_fringe_widths (f, 1); | 7779 | compute_fringe_widths (f, 1); |
| 7780 | 7780 | ||
| 7781 | /* Compute character columns occupied by scrollbar. | ||
| 7782 | |||
| 7783 | Don't do things differently for non-toolkit scrollbars | ||
| 7784 | (Bug#17163). */ | ||
| 7781 | unit = FRAME_COLUMN_WIDTH (f); | 7785 | unit = FRAME_COLUMN_WIDTH (f); |
| 7782 | #ifdef USE_TOOLKIT_SCROLL_BARS | 7786 | if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0) |
| 7783 | /* The width of a toolkit scrollbar does not change with the new | 7787 | FRAME_CONFIG_SCROLL_BAR_COLS (f) |
| 7784 | font but we have to calculate the number of columns it occupies | 7788 | = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit; |
| 7785 | anew. */ | 7789 | else |
| 7786 | FRAME_CONFIG_SCROLL_BAR_COLS (f) | 7790 | FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit; |
| 7787 | = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit; | ||
| 7788 | #else | ||
| 7789 | /* The width of a non-toolkit scrollbar is at least 14 pixels and a | ||
| 7790 | multiple of the frame's character width. */ | ||
| 7791 | FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit; | ||
| 7792 | FRAME_CONFIG_SCROLL_BAR_WIDTH (f) | ||
| 7793 | = FRAME_CONFIG_SCROLL_BAR_COLS (f) * unit; | ||
| 7794 | #endif | ||
| 7795 | 7791 | ||
| 7796 | if (FRAME_X_WINDOW (f) != 0) | 7792 | if (FRAME_X_WINDOW (f) != 0) |
| 7797 | { | 7793 | { |
| @@ -7997,7 +7993,7 @@ xim_close_dpy (struct x_display_info *dpyinfo) | |||
| 7997 | { | 7993 | { |
| 7998 | #ifdef HAVE_X11R6_XIM | 7994 | #ifdef HAVE_X11R6_XIM |
| 7999 | struct xim_inst_t *xim_inst = dpyinfo->xim_callback_data; | 7995 | struct xim_inst_t *xim_inst = dpyinfo->xim_callback_data; |
| 8000 | 7996 | ||
| 8001 | if (dpyinfo->display) | 7997 | if (dpyinfo->display) |
| 8002 | { | 7998 | { |
| 8003 | Bool ret = XUnregisterIMInstantiateCallback | 7999 | Bool ret = XUnregisterIMInstantiateCallback |