diff options
| author | Martin Rudalics | 2013-12-20 11:48:36 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2013-12-20 11:48:36 +0100 |
| commit | c44de18d7db9c038473c71d0708990c3b081402f (patch) | |
| tree | 14837bdee5bcc328b1b0d61b2f0a5d8e369a33a8 /src | |
| parent | d506bc1d20baf7ed991b01cede719791778a53c7 (diff) | |
| download | emacs-c44de18d7db9c038473c71d0708990c3b081402f.tar.gz emacs-c44de18d7db9c038473c71d0708990c3b081402f.zip | |
Some more fixes for pixelwise resizing.
Remove scroll_bar_actual_width from frames.
* frame.h (struct frame): Remove scroll_bar_actual_width slot.
* frame.c (Fscroll_bar_width): Return scroll bar area width.
(x_figure_window_size):
* nsterm.m (x_set_window_size):
* widget.c (set_frame_size):
* w32term.c (x_set_window_size):
* xterm.c (x_set_window_size, x_set_window_size_1): Don't set
scroll_bar_actual_width.
Convert scroll_bar members to integers on Windows.
* w32term.h (struct scroll_bar): Convert top, left, width,
height, start, end and dragging to integers.
* w32fns.c (w32_createscrollbar): Remove XINT conversions for
scroll_bar members.
* w32term.c (w32_set_scroll_bar_thumb)
(w32_scroll_bar_handle_click): Remove XINT conversions for
scroll_bar members. Treat bar->dragging as integer.
(x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
first element. Remove XINT conversions for scroll_bar members.
(w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
Remove XINT conversions for scroll_bar members.
Fix assignment for new window total sizes.
* window.c (Fwindow_resize_apply_total): Assign values for
minibuffer window.
* window.el (window--pixel-to-size): Remove function.
(window--pixel-to-total-1, window--pixel-to-total): Fix
calculation of new total sizes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 29 | ||||
| -rw-r--r-- | src/dispnew.c | 3 | ||||
| -rw-r--r-- | src/frame.c | 4 | ||||
| -rw-r--r-- | src/frame.h | 4 | ||||
| -rw-r--r-- | src/nsterm.m | 1 | ||||
| -rw-r--r-- | src/w32fns.c | 3 | ||||
| -rw-r--r-- | src/w32term.c | 60 | ||||
| -rw-r--r-- | src/w32term.h | 6 | ||||
| -rw-r--r-- | src/widget.c | 2 | ||||
| -rw-r--r-- | src/window.c | 14 | ||||
| -rw-r--r-- | src/xterm.c | 9 |
11 files changed, 79 insertions, 56 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 23857e33a6d..dbb77ae1646 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,32 @@ | |||
| 1 | 2013-12-20 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | Remove scroll_bar_actual_width from frames. | ||
| 4 | * frame.h (struct frame): Remove scroll_bar_actual_width slot. | ||
| 5 | * frame.c (Fscroll_bar_width): Return scroll bar area width. | ||
| 6 | (x_figure_window_size): | ||
| 7 | * nsterm.m (x_set_window_size): | ||
| 8 | * widget.c (set_frame_size): | ||
| 9 | * w32term.c (x_set_window_size): | ||
| 10 | * xterm.c (x_set_window_size, x_set_window_size_1): Don't set | ||
| 11 | scroll_bar_actual_width. | ||
| 12 | |||
| 13 | Convert scroll_bar members to integers on Windows. | ||
| 14 | * w32term.h (struct scroll_bar): Convert top, left, width, | ||
| 15 | height, start, end and dragging to integers. | ||
| 16 | * w32fns.c (w32_createscrollbar): Remove XINT conversions for | ||
| 17 | scroll_bar members. | ||
| 18 | * w32term.c (w32_set_scroll_bar_thumb) | ||
| 19 | (w32_scroll_bar_handle_click): Remove XINT conversions for | ||
| 20 | scroll_bar members. Treat bar->dragging as integer. | ||
| 21 | (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as | ||
| 22 | first element. Remove XINT conversions for scroll_bar members. | ||
| 23 | (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion): | ||
| 24 | Remove XINT conversions for scroll_bar members. | ||
| 25 | |||
| 26 | Fix assignment for new window total sizes. | ||
| 27 | * window.c (Fwindow_resize_apply_total): Assign values for | ||
| 28 | minibuffer window. | ||
| 29 | |||
| 1 | 2013-12-20 Chong Yidong <cyd@gnu.org> | 30 | 2013-12-20 Chong Yidong <cyd@gnu.org> |
| 2 | 31 | ||
| 3 | * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp' | 32 | * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp' |
diff --git a/src/dispnew.c b/src/dispnew.c index 967fffe469b..cbf1963feca 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5488,6 +5488,8 @@ change_frame_size_1 (struct frame *f, int new_width, int new_height, | |||
| 5488 | { | 5488 | { |
| 5489 | new_text_width = (new_width == 0) ? FRAME_TEXT_WIDTH (f) : new_width; | 5489 | new_text_width = (new_width == 0) ? FRAME_TEXT_WIDTH (f) : new_width; |
| 5490 | new_text_height = (new_height == 0) ? FRAME_TEXT_HEIGHT (f) : new_height; | 5490 | new_text_height = (new_height == 0) ? FRAME_TEXT_HEIGHT (f) : new_height; |
| 5491 | /* Consider rounding here: Currently, the root window can be | ||
| 5492 | larger than the frame in terms of columns/lines. */ | ||
| 5491 | new_cols = new_text_width / FRAME_COLUMN_WIDTH (f); | 5493 | new_cols = new_text_width / FRAME_COLUMN_WIDTH (f); |
| 5492 | new_lines = new_text_height / FRAME_LINE_HEIGHT (f); | 5494 | new_lines = new_text_height / FRAME_LINE_HEIGHT (f); |
| 5493 | } | 5495 | } |
| @@ -5507,7 +5509,6 @@ change_frame_size_1 (struct frame *f, int new_width, int new_height, | |||
| 5507 | fringe columns. Do this after rounding - see discussion of | 5509 | fringe columns. Do this after rounding - see discussion of |
| 5508 | bug#9723. */ | 5510 | bug#9723. */ |
| 5509 | new_root_width = (new_text_width | 5511 | new_root_width = (new_text_width |
| 5510 | /* PXM: Use the configured scrollbar width !?? */ | ||
| 5511 | + FRAME_SCROLL_BAR_AREA_WIDTH (f) | 5512 | + FRAME_SCROLL_BAR_AREA_WIDTH (f) |
| 5512 | + FRAME_TOTAL_FRINGE_WIDTH (f)); | 5513 | + FRAME_TOTAL_FRINGE_WIDTH (f)); |
| 5513 | /* If we're not changing the frame size, quit now. */ | 5514 | /* If we're not changing the frame size, quit now. */ |
diff --git a/src/frame.c b/src/frame.c index 7699f24fbb1..25e0f2727ca 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -2515,7 +2515,7 @@ DEFUN ("frame-scroll-bar-width", Fscroll_bar_width, Sscroll_bar_width, 0, 1, 0, | |||
| 2515 | doc: /* Return scroll bar width of FRAME in pixels. */) | 2515 | doc: /* Return scroll bar width of FRAME in pixels. */) |
| 2516 | (Lisp_Object frame) | 2516 | (Lisp_Object frame) |
| 2517 | { | 2517 | { |
| 2518 | return make_number (decode_any_frame (frame)->scroll_bar_actual_width); | 2518 | return make_number (FRAME_SCROLL_BAR_AREA_WIDTH (decode_any_frame (frame))); |
| 2519 | } | 2519 | } |
| 2520 | 2520 | ||
| 2521 | DEFUN ("frame-fringe-width", Ffringe_width, Sfringe_width, 0, 1, 0, | 2521 | DEFUN ("frame-fringe-width", Ffringe_width, Sfringe_width, 0, 1, 0, |
| @@ -4237,8 +4237,6 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p) | |||
| 4237 | window_prompting |= PSize; | 4237 | window_prompting |= PSize; |
| 4238 | } | 4238 | } |
| 4239 | 4239 | ||
| 4240 | f->scroll_bar_actual_width | ||
| 4241 | = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f); | ||
| 4242 | 4240 | ||
| 4243 | /* This used to be done _before_ calling x_figure_window_size, but | 4241 | /* This used to be done _before_ calling x_figure_window_size, but |
| 4244 | since the height is reset here, this was really a no-op. I | 4242 | since the height is reset here, this was really a no-op. I |
diff --git a/src/frame.h b/src/frame.h index f9b368fb5ec..d7bbbd0686b 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -436,10 +436,6 @@ struct frame | |||
| 436 | int config_scroll_bar_width; | 436 | int config_scroll_bar_width; |
| 437 | int config_scroll_bar_cols; | 437 | int config_scroll_bar_cols; |
| 438 | 438 | ||
| 439 | /* The size of the extra width currently allotted for vertical | ||
| 440 | scroll bars in this frame, in pixels. */ | ||
| 441 | int scroll_bar_actual_width; | ||
| 442 | |||
| 443 | /* The baud rate that was used to calculate costs for this frame. */ | 439 | /* The baud rate that was used to calculate costs for this frame. */ |
| 444 | int cost_calculation_baud_rate; | 440 | int cost_calculation_baud_rate; |
| 445 | 441 | ||
diff --git a/src/nsterm.m b/src/nsterm.m index 8047bca1f60..10780b054d9 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -1289,7 +1289,6 @@ x_set_window_size (struct frame *f, | |||
| 1289 | 1289 | ||
| 1290 | check_frame_size (f, &width, &height, pixelwise); | 1290 | check_frame_size (f, &width, &height, pixelwise); |
| 1291 | 1291 | ||
| 1292 | f->scroll_bar_actual_width = NS_SCROLL_BAR_WIDTH (f); | ||
| 1293 | compute_fringe_widths (f, 0); | 1292 | compute_fringe_widths (f, 0); |
| 1294 | 1293 | ||
| 1295 | if (pixelwise) | 1294 | if (pixelwise) |
diff --git a/src/w32fns.c b/src/w32fns.c index 73197c6a8f2..59526936afe 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -1912,8 +1912,7 @@ w32_createscrollbar (struct frame *f, struct scroll_bar * bar) | |||
| 1912 | { | 1912 | { |
| 1913 | return CreateWindow ("SCROLLBAR", "", SBS_VERT | WS_CHILD | WS_VISIBLE, | 1913 | return CreateWindow ("SCROLLBAR", "", SBS_VERT | WS_CHILD | WS_VISIBLE, |
| 1914 | /* Position and size of scroll bar. */ | 1914 | /* Position and size of scroll bar. */ |
| 1915 | XINT (bar->left), XINT (bar->top), | 1915 | bar->left, bar->top, bar->width, bar->height, |
| 1916 | XINT (bar->width), XINT (bar->height), | ||
| 1917 | FRAME_W32_WINDOW (f), NULL, hinst, NULL); | 1916 | FRAME_W32_WINDOW (f), NULL, hinst, NULL); |
| 1918 | } | 1917 | } |
| 1919 | 1918 | ||
diff --git a/src/w32term.c b/src/w32term.c index a66aca1e846..a39ab37768c 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -3451,9 +3451,7 @@ w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, | |||
| 3451 | = x_window_to_scroll_bar (WindowFromPoint (pt)); | 3451 | = x_window_to_scroll_bar (WindowFromPoint (pt)); |
| 3452 | 3452 | ||
| 3453 | if (bar) | 3453 | if (bar) |
| 3454 | { | 3454 | f1 = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); |
| 3455 | f1 = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); | ||
| 3456 | } | ||
| 3457 | } | 3455 | } |
| 3458 | 3456 | ||
| 3459 | if (f1 == 0 && insist > 0) | 3457 | if (f1 == 0 && insist > 0) |
| @@ -3560,10 +3558,10 @@ w32_set_scroll_bar_thumb (struct scroll_bar *bar, | |||
| 3560 | /* We use the whole scroll-bar height in the calculations below, to | 3558 | /* We use the whole scroll-bar height in the calculations below, to |
| 3561 | avoid strange effects like scrolling backwards when just clicking | 3559 | avoid strange effects like scrolling backwards when just clicking |
| 3562 | on the handle (without moving it). */ | 3560 | on the handle (without moving it). */ |
| 3563 | double range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)) | 3561 | double range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height) |
| 3564 | + VERTICAL_SCROLL_BAR_MIN_HANDLE; | 3562 | + VERTICAL_SCROLL_BAR_MIN_HANDLE; |
| 3565 | int sb_page, sb_pos; | 3563 | int sb_page, sb_pos; |
| 3566 | BOOL draggingp = !NILP (bar->dragging) ? TRUE : FALSE; | 3564 | BOOL draggingp = bar->dragging ? TRUE : FALSE; |
| 3567 | SCROLLINFO si; | 3565 | SCROLLINFO si; |
| 3568 | 3566 | ||
| 3569 | /* We used to change the nPage setting while dragging the handle, | 3567 | /* We used to change the nPage setting while dragging the handle, |
| @@ -3708,19 +3706,19 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height) | |||
| 3708 | HWND hwnd; | 3706 | HWND hwnd; |
| 3709 | SCROLLINFO si; | 3707 | SCROLLINFO si; |
| 3710 | struct scroll_bar *bar | 3708 | struct scroll_bar *bar |
| 3711 | = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, fringe_extended_p, PVEC_OTHER); | 3709 | = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, top, PVEC_OTHER); |
| 3712 | Lisp_Object barobj; | 3710 | Lisp_Object barobj; |
| 3713 | 3711 | ||
| 3714 | block_input (); | 3712 | block_input (); |
| 3715 | 3713 | ||
| 3716 | XSETWINDOW (bar->window, w); | 3714 | XSETWINDOW (bar->window, w); |
| 3717 | XSETINT (bar->top, top); | 3715 | bar->top = top; |
| 3718 | XSETINT (bar->left, left); | 3716 | bar->left = left; |
| 3719 | XSETINT (bar->width, width); | 3717 | bar->width = width; |
| 3720 | XSETINT (bar->height, height); | 3718 | bar->height = height; |
| 3721 | XSETINT (bar->start, 0); | 3719 | bar->start = 0; |
| 3722 | XSETINT (bar->end, 0); | 3720 | bar->end = 0; |
| 3723 | bar->dragging = Qnil; | 3721 | bar->dragging = 0; |
| 3724 | bar->fringe_extended_p = 0; | 3722 | bar->fringe_extended_p = 0; |
| 3725 | 3723 | ||
| 3726 | /* Requires geometry to be set before call to create the real window */ | 3724 | /* Requires geometry to be set before call to create the real window */ |
| @@ -3838,10 +3836,10 @@ w32_set_vertical_scroll_bar (struct window *w, | |||
| 3838 | hwnd = SCROLL_BAR_W32_WINDOW (bar); | 3836 | hwnd = SCROLL_BAR_W32_WINDOW (bar); |
| 3839 | 3837 | ||
| 3840 | /* If already correctly positioned, do nothing. */ | 3838 | /* If already correctly positioned, do nothing. */ |
| 3841 | if (XINT (bar->left) == sb_left | 3839 | if (bar->left == sb_left |
| 3842 | && XINT (bar->top) == top | 3840 | && bar->top == top |
| 3843 | && XINT (bar->width) == sb_width | 3841 | && bar->width == sb_width |
| 3844 | && XINT (bar->height) == height | 3842 | && bar->height == height |
| 3845 | && bar->fringe_extended_p == fringe_extended_p) | 3843 | && bar->fringe_extended_p == fringe_extended_p) |
| 3846 | { | 3844 | { |
| 3847 | /* Redraw after clear_frame. */ | 3845 | /* Redraw after clear_frame. */ |
| @@ -3883,10 +3881,10 @@ w32_set_vertical_scroll_bar (struct window *w, | |||
| 3883 | /* InvalidateRect (w, NULL, FALSE); */ | 3881 | /* InvalidateRect (w, NULL, FALSE); */ |
| 3884 | 3882 | ||
| 3885 | /* Remember new settings. */ | 3883 | /* Remember new settings. */ |
| 3886 | XSETINT (bar->left, sb_left); | 3884 | bar->left = sb_left; |
| 3887 | XSETINT (bar->top, top); | 3885 | bar->top = top; |
| 3888 | XSETINT (bar->width, sb_width); | 3886 | bar->width = sb_width; |
| 3889 | XSETINT (bar->height, height); | 3887 | bar->height = height; |
| 3890 | 3888 | ||
| 3891 | unblock_input (); | 3889 | unblock_input (); |
| 3892 | } | 3890 | } |
| @@ -4026,9 +4024,9 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, | |||
| 4026 | emacs_event->timestamp = msg->msg.time; | 4024 | emacs_event->timestamp = msg->msg.time; |
| 4027 | 4025 | ||
| 4028 | { | 4026 | { |
| 4029 | int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)); | 4027 | int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height); |
| 4030 | int y; | 4028 | int y; |
| 4031 | int dragging = !NILP (bar->dragging); | 4029 | int dragging = bar->dragging; |
| 4032 | SCROLLINFO si; | 4030 | SCROLLINFO si; |
| 4033 | 4031 | ||
| 4034 | si.cbSize = sizeof (si); | 4032 | si.cbSize = sizeof (si); |
| @@ -4037,7 +4035,7 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, | |||
| 4037 | GetScrollInfo ((HWND) msg->msg.lParam, SB_CTL, &si); | 4035 | GetScrollInfo ((HWND) msg->msg.lParam, SB_CTL, &si); |
| 4038 | y = si.nPos; | 4036 | y = si.nPos; |
| 4039 | 4037 | ||
| 4040 | bar->dragging = Qnil; | 4038 | bar->dragging = 0; |
| 4041 | FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam; | 4039 | FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam; |
| 4042 | 4040 | ||
| 4043 | switch (LOWORD (msg->msg.wParam)) | 4041 | switch (LOWORD (msg->msg.wParam)) |
| @@ -4064,9 +4062,9 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, | |||
| 4064 | break; | 4062 | break; |
| 4065 | case SB_THUMBTRACK: | 4063 | case SB_THUMBTRACK: |
| 4066 | case SB_THUMBPOSITION: | 4064 | case SB_THUMBPOSITION: |
| 4067 | if (VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)) <= 0xffff) | 4065 | if (VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height) <= 0xffff) |
| 4068 | y = HIWORD (msg->msg.wParam); | 4066 | y = HIWORD (msg->msg.wParam); |
| 4069 | bar->dragging = Qt; | 4067 | bar->dragging = 1; /* ??????? */ |
| 4070 | emacs_event->part = scroll_bar_handle; | 4068 | emacs_event->part = scroll_bar_handle; |
| 4071 | 4069 | ||
| 4072 | /* "Silently" update current position. */ | 4070 | /* "Silently" update current position. */ |
| @@ -4090,8 +4088,8 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, | |||
| 4090 | if (dragging) | 4088 | if (dragging) |
| 4091 | { | 4089 | { |
| 4092 | SCROLLINFO si; | 4090 | SCROLLINFO si; |
| 4093 | int start = XINT (bar->start); | 4091 | int start = bar->start; |
| 4094 | int end = XINT (bar->end); | 4092 | int end = bar->end; |
| 4095 | 4093 | ||
| 4096 | si.cbSize = sizeof (si); | 4094 | si.cbSize = sizeof (si); |
| 4097 | si.fMask = SIF_PAGE | SIF_POS; | 4095 | si.fMask = SIF_PAGE | SIF_POS; |
| @@ -4126,7 +4124,7 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window, | |||
| 4126 | Window w = SCROLL_BAR_W32_WINDOW (bar); | 4124 | Window w = SCROLL_BAR_W32_WINDOW (bar); |
| 4127 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); | 4125 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); |
| 4128 | int pos; | 4126 | int pos; |
| 4129 | int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)); | 4127 | int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height); |
| 4130 | SCROLLINFO si; | 4128 | SCROLLINFO si; |
| 4131 | 4129 | ||
| 4132 | block_input (); | 4130 | block_input (); |
| @@ -4146,7 +4144,7 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window, | |||
| 4146 | case SB_THUMBPOSITION: | 4144 | case SB_THUMBPOSITION: |
| 4147 | case SB_THUMBTRACK: | 4145 | case SB_THUMBTRACK: |
| 4148 | *part = scroll_bar_handle; | 4146 | *part = scroll_bar_handle; |
| 4149 | if (VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)) <= 0xffff) | 4147 | if (VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height) <= 0xffff) |
| 4150 | pos = HIWORD (dpyinfo->last_mouse_scroll_bar_pos); | 4148 | pos = HIWORD (dpyinfo->last_mouse_scroll_bar_pos); |
| 4151 | break; | 4149 | break; |
| 4152 | case SB_LINEDOWN: | 4150 | case SB_LINEDOWN: |
| @@ -5710,8 +5708,6 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b | |||
| 5710 | block_input (); | 5708 | block_input (); |
| 5711 | 5709 | ||
| 5712 | check_frame_size (f, &width, &height, pixelwise); | 5710 | check_frame_size (f, &width, &height, pixelwise); |
| 5713 | f->scroll_bar_actual_width | ||
| 5714 | = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f); | ||
| 5715 | 5711 | ||
| 5716 | compute_fringe_widths (f, 0); | 5712 | compute_fringe_widths (f, 0); |
| 5717 | 5713 | ||
diff --git a/src/w32term.h b/src/w32term.h index 89008b7348c..b8a1823d7b0 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -429,7 +429,7 @@ struct scroll_bar { | |||
| 429 | 429 | ||
| 430 | /* The position and size of the scroll bar in pixels, relative to the | 430 | /* The position and size of the scroll bar in pixels, relative to the |
| 431 | frame. */ | 431 | frame. */ |
| 432 | Lisp_Object top, left, width, height; | 432 | int top, left, width, height; |
| 433 | 433 | ||
| 434 | /* The starting and ending positions of the handle, relative to the | 434 | /* The starting and ending positions of the handle, relative to the |
| 435 | handle area (i.e. zero is the top position, not | 435 | handle area (i.e. zero is the top position, not |
| @@ -442,13 +442,13 @@ struct scroll_bar { | |||
| 442 | drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below | 442 | drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below |
| 443 | where they would be normally; the bottom and top are in a | 443 | where they would be normally; the bottom and top are in a |
| 444 | different co-ordinate system. */ | 444 | different co-ordinate system. */ |
| 445 | Lisp_Object start, end; | 445 | int start, end; |
| 446 | 446 | ||
| 447 | /* If the scroll bar handle is currently being dragged by the user, | 447 | /* If the scroll bar handle is currently being dragged by the user, |
| 448 | this is the number of pixels from the top of the handle to the | 448 | this is the number of pixels from the top of the handle to the |
| 449 | place where the user grabbed it. If the handle isn't currently | 449 | place where the user grabbed it. If the handle isn't currently |
| 450 | being dragged, this is Qnil. */ | 450 | being dragged, this is Qnil. */ |
| 451 | Lisp_Object dragging; | 451 | int dragging; |
| 452 | 452 | ||
| 453 | /* 1 if the background of the fringe that is adjacent to a scroll | 453 | /* 1 if the background of the fringe that is adjacent to a scroll |
| 454 | bar is extended to the gap between the fringe and the bar. */ | 454 | bar is extended to the gap between the fringe and the bar. */ |
diff --git a/src/widget.c b/src/widget.c index 89b43fdae76..73c5149e2cd 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -404,8 +404,6 @@ set_frame_size (EmacsFrame ew) | |||
| 404 | might end up with a frame width that is not a multiple of the | 404 | might end up with a frame width that is not a multiple of the |
| 405 | frame's character width which is bad for vertically split | 405 | frame's character width which is bad for vertically split |
| 406 | windows. */ | 406 | windows. */ |
| 407 | f->scroll_bar_actual_width | ||
| 408 | = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f); | ||
| 409 | 407 | ||
| 410 | compute_fringe_widths (f, 0); | 408 | compute_fringe_widths (f, 0); |
| 411 | 409 | ||
diff --git a/src/window.c b/src/window.c index 9bf6ad4b8f3..e0c44ad344b 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -4001,6 +4001,20 @@ values. */) | |||
| 4001 | r->left_col = 0; | 4001 | r->left_col = 0; |
| 4002 | r->top_line = FRAME_TOP_MARGIN (f); | 4002 | r->top_line = FRAME_TOP_MARGIN (f); |
| 4003 | window_resize_apply_total (r, !NILP (horizontal)); | 4003 | window_resize_apply_total (r, !NILP (horizontal)); |
| 4004 | /* Handle the mini window. */ | ||
| 4005 | if (FRAME_HAS_MINIBUF_P (f) && !FRAME_MINIBUF_ONLY_P (f)) | ||
| 4006 | { | ||
| 4007 | struct window *m = XWINDOW (f->minibuffer_window); | ||
| 4008 | |||
| 4009 | if (NILP (horizontal)) | ||
| 4010 | { | ||
| 4011 | m->top_line = r->top_line + r->total_lines; | ||
| 4012 | m->total_lines = XFASTINT (m->new_total); | ||
| 4013 | } | ||
| 4014 | else | ||
| 4015 | m->total_cols = XFASTINT (m->new_total); | ||
| 4016 | } | ||
| 4017 | |||
| 4004 | unblock_input (); | 4018 | unblock_input (); |
| 4005 | 4019 | ||
| 4006 | return Qt; | 4020 | return Qt; |
diff --git a/src/xterm.c b/src/xterm.c index 20157acca2e..f634feb21f9 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8537,10 +8537,6 @@ x_set_window_size_1 (struct frame *f, int change_gravity, int width, int height, | |||
| 8537 | int pixelwidth, pixelheight; | 8537 | int pixelwidth, pixelheight; |
| 8538 | 8538 | ||
| 8539 | check_frame_size (f, &width, &height, pixelwise); | 8539 | check_frame_size (f, &width, &height, pixelwise); |
| 8540 | f->scroll_bar_actual_width | ||
| 8541 | = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f) | ||
| 8542 | ? 0 | ||
| 8543 | : FRAME_CONFIG_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)); | ||
| 8544 | 8540 | ||
| 8545 | compute_fringe_widths (f, 0); | 8541 | compute_fringe_widths (f, 0); |
| 8546 | 8542 | ||
| @@ -8623,10 +8619,7 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b | |||
| 8623 | #endif | 8619 | #endif |
| 8624 | text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, FRAME_PIXEL_WIDTH (f)); | 8620 | text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, FRAME_PIXEL_WIDTH (f)); |
| 8625 | text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, pixelh); | 8621 | text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, pixelh); |
| 8626 | /* Update f->scroll_bar_actual_width because it is used in | 8622 | |
| 8627 | FRAME_PIXEL_WIDTH_TO_TEXT_COLS. */ | ||
| 8628 | f->scroll_bar_actual_width | ||
| 8629 | = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f); | ||
| 8630 | change_frame_size (f, text_width, text_height, 0, 1, 0, 1); | 8623 | change_frame_size (f, text_width, text_height, 0, 1, 0, 1); |
| 8631 | } | 8624 | } |
| 8632 | 8625 | ||