diff options
| author | Kim F. Storm | 2003-05-24 22:07:03 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2003-05-24 22:07:03 +0000 |
| commit | 90022f5a3e142d08696bd4d73ac26c308aa762fd (patch) | |
| tree | 9fabbb30a80273beb5fa8c0ebb1cd5325faa2dd9 /src | |
| parent | 03e4639645519fba65b1413339f741705bb79078 (diff) | |
| download | emacs-90022f5a3e142d08696bd4d73ac26c308aa762fd.tar.gz emacs-90022f5a3e142d08696bd4d73ac26c308aa762fd.zip | |
Make (few) trivial substitutions for renamed and
new macros in dispextern.h, frame.h and window.h.
Diffstat (limited to 'src')
| -rw-r--r-- | src/indent.c | 22 | ||||
| -rw-r--r-- | src/macmenu.c | 6 | ||||
| -rw-r--r-- | src/sysdep.c | 6 | ||||
| -rw-r--r-- | src/w32console.c | 28 | ||||
| -rw-r--r-- | src/w32menu.c | 8 | ||||
| -rw-r--r-- | src/widget.c | 60 |
6 files changed, 62 insertions, 68 deletions
diff --git a/src/indent.c b/src/indent.c index 22039ebca6b..10831c2c941 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1159,18 +1159,18 @@ struct position val_compute_motion; | |||
| 1159 | 1159 | ||
| 1160 | window_width - 1 | 1160 | window_width - 1 |
| 1161 | - (has_vertical_scroll_bars | 1161 | - (has_vertical_scroll_bars |
| 1162 | ? FRAME_SCROLL_BAR_COLS (XFRAME (window->frame)) | 1162 | ? WINDOW_CONFIG_SCROLL_BAR_COLS (window) |
| 1163 | : (window_width + window_left != frame_width)) | 1163 | : (window_width + window_left != frame_cols)) |
| 1164 | 1164 | ||
| 1165 | where | 1165 | where |
| 1166 | window_width is XFASTINT (w->width), | 1166 | window_width is XFASTINT (w->total_cols), |
| 1167 | window_left is XFASTINT (w->left), | 1167 | window_left is XFASTINT (w->left_col), |
| 1168 | has_vertical_scroll_bars is | 1168 | has_vertical_scroll_bars is |
| 1169 | FRAME_HAS_VERTICAL_SCROLL_BARS (XFRAME (WINDOW_FRAME (window))) | 1169 | WINDOW_HAS_VERTICAL_SCROLL_BAR (window) |
| 1170 | and frame_width = FRAME_WIDTH (XFRAME (window->frame)) | 1170 | and frame_cols = FRAME_COLS (XFRAME (window->frame)) |
| 1171 | 1171 | ||
| 1172 | Or you can let window_internal_width do this all for you, and write: | 1172 | Or you can let window_box_text_cols do this all for you, and write: |
| 1173 | window_internal_width (w) - 1 | 1173 | window_box_text_cols (w) - 1 |
| 1174 | 1174 | ||
| 1175 | The `-1' accounts for the continuation-line backslashes; the rest | 1175 | The `-1' accounts for the continuation-line backslashes; the rest |
| 1176 | accounts for window borders if the window is split horizontally, and | 1176 | accounts for window borders if the window is split horizontally, and |
| @@ -1366,7 +1366,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1366 | { | 1366 | { |
| 1367 | if (hscroll | 1367 | if (hscroll |
| 1368 | || (truncate_partial_width_windows | 1368 | || (truncate_partial_width_windows |
| 1369 | && width + 1 < FRAME_WIDTH (XFRAME (WINDOW_FRAME (win)))) | 1369 | && width + 1 < FRAME_COLS (XFRAME (WINDOW_FRAME (win)))) |
| 1370 | || !NILP (current_buffer->truncate_lines)) | 1370 | || !NILP (current_buffer->truncate_lines)) |
| 1371 | { | 1371 | { |
| 1372 | /* Truncating: skip to newline, unless we are already past | 1372 | /* Truncating: skip to newline, unless we are already past |
| @@ -1834,7 +1834,9 @@ vmotion (from, vtarget, w) | |||
| 1834 | register int from, vtarget; | 1834 | register int from, vtarget; |
| 1835 | struct window *w; | 1835 | struct window *w; |
| 1836 | { | 1836 | { |
| 1837 | int width = window_internal_width (w) - 1; | 1837 | /* We don't need to make room for continuation marks (we have fringes now), |
| 1838 | so hould we really subtract 1 here if FRAME_WINDOW_P ? ++KFS */ | ||
| 1839 | int width = window_box_text_cols (w) - 1; | ||
| 1838 | int hscroll = XINT (w->hscroll); | 1840 | int hscroll = XINT (w->hscroll); |
| 1839 | struct position pos; | 1841 | struct position pos; |
| 1840 | /* vpos is cumulative vertical position, changed as from is changed */ | 1842 | /* vpos is cumulative vertical position, changed as from is changed */ |
diff --git a/src/macmenu.c b/src/macmenu.c index 3958be9668d..166ef22a6e9 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -732,10 +732,8 @@ cached information about equivalent key sequences. */) | |||
| 732 | CHECK_LIVE_WINDOW (window); | 732 | CHECK_LIVE_WINDOW (window); |
| 733 | f = XFRAME (WINDOW_FRAME (XWINDOW (window))); | 733 | f = XFRAME (WINDOW_FRAME (XWINDOW (window))); |
| 734 | 734 | ||
| 735 | xpos = (FONT_WIDTH (FRAME_FONT (f)) | 735 | xpos = WINDOW_LEFT_EDGE_X (XWINDOW (window)); |
| 736 | * XFASTINT (XWINDOW (window)->left)); | 736 | ypos = WINDOW_TOP_EDGE_Y (XWINDOW (window)); |
| 737 | ypos = (FRAME_LINE_HEIGHT (f) | ||
| 738 | * XFASTINT (XWINDOW (window)->top)); | ||
| 739 | } | 737 | } |
| 740 | else | 738 | else |
| 741 | /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, | 739 | /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, |
diff --git a/src/sysdep.c b/src/sysdep.c index 1e4ed7576dd..cb03ae502bb 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -1814,10 +1814,10 @@ reset_sys_modes () | |||
| 1814 | return; | 1814 | return; |
| 1815 | #endif | 1815 | #endif |
| 1816 | sf = SELECTED_FRAME (); | 1816 | sf = SELECTED_FRAME (); |
| 1817 | cursor_to (FRAME_HEIGHT (sf) - 1, 0); | 1817 | cursor_to (FRAME_LINES (sf) - 1, 0); |
| 1818 | clear_end_of_line (FRAME_WIDTH (sf)); | 1818 | clear_end_of_line (FRAME_COLS (sf)); |
| 1819 | /* clear_end_of_line may move the cursor */ | 1819 | /* clear_end_of_line may move the cursor */ |
| 1820 | cursor_to (FRAME_HEIGHT (sf) - 1, 0); | 1820 | cursor_to (FRAME_LINES (sf) - 1, 0); |
| 1821 | #if defined (IBMR2AIX) && defined (AIXHFT) | 1821 | #if defined (IBMR2AIX) && defined (AIXHFT) |
| 1822 | { | 1822 | { |
| 1823 | /* HFT devices normally use ^J as a LF/CR. We forced it to | 1823 | /* HFT devices normally use ^J as a LF/CR. We forced it to |
diff --git a/src/w32console.c b/src/w32console.c index 5a66ae4af8d..0ad9c755e25 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -121,8 +121,8 @@ clear_to_end (void) | |||
| 121 | { | 121 | { |
| 122 | struct frame * f = PICK_FRAME (); | 122 | struct frame * f = PICK_FRAME (); |
| 123 | 123 | ||
| 124 | clear_end_of_line (FRAME_WIDTH (f) - 1); | 124 | clear_end_of_line (FRAME_COLS (f) - 1); |
| 125 | ins_del_lines (cursor_coords.Y, FRAME_HEIGHT (f) - cursor_coords.Y - 1); | 125 | ins_del_lines (cursor_coords.Y, FRAME_LINES (f) - cursor_coords.Y - 1); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | /* Clear the frame. */ | 128 | /* Clear the frame. */ |
| @@ -138,7 +138,7 @@ clear_frame (void) | |||
| 138 | GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info); | 138 | GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info); |
| 139 | 139 | ||
| 140 | /* Remember that the screen buffer might be wider than the window. */ | 140 | /* Remember that the screen buffer might be wider than the window. */ |
| 141 | n = FRAME_HEIGHT (f) * info.dwSize.X; | 141 | n = FRAME_LINES (f) * info.dwSize.X; |
| 142 | dest.X = dest.Y = 0; | 142 | dest.X = dest.Y = 0; |
| 143 | 143 | ||
| 144 | FillConsoleOutputAttribute (cur_screen, char_attr_normal, n, dest, &r); | 144 | FillConsoleOutputAttribute (cur_screen, char_attr_normal, n, dest, &r); |
| @@ -180,17 +180,17 @@ ins_del_lines (int vpos, int n) | |||
| 180 | if (n < 0) | 180 | if (n < 0) |
| 181 | { | 181 | { |
| 182 | scroll.Top = vpos - n; | 182 | scroll.Top = vpos - n; |
| 183 | scroll.Bottom = FRAME_HEIGHT (f); | 183 | scroll.Bottom = FRAME_LINES (f); |
| 184 | dest.Y = vpos; | 184 | dest.Y = vpos; |
| 185 | } | 185 | } |
| 186 | else | 186 | else |
| 187 | { | 187 | { |
| 188 | scroll.Top = vpos; | 188 | scroll.Top = vpos; |
| 189 | scroll.Bottom = FRAME_HEIGHT (f) - n; | 189 | scroll.Bottom = FRAME_LINES (f) - n; |
| 190 | dest.Y = vpos + n; | 190 | dest.Y = vpos + n; |
| 191 | } | 191 | } |
| 192 | scroll.Left = 0; | 192 | scroll.Left = 0; |
| 193 | scroll.Right = FRAME_WIDTH (f); | 193 | scroll.Right = FRAME_COLS (f); |
| 194 | 194 | ||
| 195 | dest.X = 0; | 195 | dest.X = 0; |
| 196 | 196 | ||
| @@ -213,7 +213,7 @@ ins_del_lines (int vpos, int n) | |||
| 213 | for (i = scroll.Bottom; i < dest.Y; i++) | 213 | for (i = scroll.Bottom; i < dest.Y; i++) |
| 214 | { | 214 | { |
| 215 | move_cursor (i, 0); | 215 | move_cursor (i, 0); |
| 216 | clear_end_of_line (FRAME_WIDTH (f)); | 216 | clear_end_of_line (FRAME_COLS (f)); |
| 217 | } | 217 | } |
| 218 | } | 218 | } |
| 219 | } | 219 | } |
| @@ -226,7 +226,7 @@ ins_del_lines (int vpos, int n) | |||
| 226 | for (i = nb; i < scroll.Top; i++) | 226 | for (i = nb; i < scroll.Top; i++) |
| 227 | { | 227 | { |
| 228 | move_cursor (i, 0); | 228 | move_cursor (i, 0); |
| 229 | clear_end_of_line (FRAME_WIDTH (f)); | 229 | clear_end_of_line (FRAME_COLS (f)); |
| 230 | } | 230 | } |
| 231 | } | 231 | } |
| 232 | } | 232 | } |
| @@ -256,12 +256,12 @@ scroll_line (int dist, int direction) | |||
| 256 | if (direction == LEFT) | 256 | if (direction == LEFT) |
| 257 | { | 257 | { |
| 258 | scroll.Left = cursor_coords.X + dist; | 258 | scroll.Left = cursor_coords.X + dist; |
| 259 | scroll.Right = FRAME_WIDTH (f) - 1; | 259 | scroll.Right = FRAME_COLS (f) - 1; |
| 260 | } | 260 | } |
| 261 | else | 261 | else |
| 262 | { | 262 | { |
| 263 | scroll.Left = cursor_coords.X; | 263 | scroll.Left = cursor_coords.X; |
| 264 | scroll.Right = FRAME_WIDTH (f) - dist - 1; | 264 | scroll.Right = FRAME_COLS (f) - dist - 1; |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | dest.X = cursor_coords.X; | 267 | dest.X = cursor_coords.X; |
| @@ -661,16 +661,16 @@ initialize_w32_display (void) | |||
| 661 | 661 | ||
| 662 | if (w32_use_full_screen_buffer) | 662 | if (w32_use_full_screen_buffer) |
| 663 | { | 663 | { |
| 664 | FRAME_HEIGHT (SELECTED_FRAME ()) = info.dwSize.Y; /* lines per page */ | 664 | FRAME_LINES (SELECTED_FRAME ()) = info.dwSize.Y; /* lines per page */ |
| 665 | SET_FRAME_WIDTH (SELECTED_FRAME (), info.dwSize.X); /* characters per line */ | 665 | SET_FRAME_COLS (SELECTED_FRAME (), info.dwSize.X); /* characters per line */ |
| 666 | } | 666 | } |
| 667 | else | 667 | else |
| 668 | { | 668 | { |
| 669 | /* Lines per page. Use buffer coords instead of buffer size. */ | 669 | /* Lines per page. Use buffer coords instead of buffer size. */ |
| 670 | FRAME_HEIGHT (SELECTED_FRAME ()) = 1 + info.srWindow.Bottom - | 670 | FRAME_LINES (SELECTED_FRAME ()) = 1 + info.srWindow.Bottom - |
| 671 | info.srWindow.Top; | 671 | info.srWindow.Top; |
| 672 | /* Characters per line. Use buffer coords instead of buffer size. */ | 672 | /* Characters per line. Use buffer coords instead of buffer size. */ |
| 673 | SET_FRAME_WIDTH (SELECTED_FRAME (), 1 + info.srWindow.Right - | 673 | SET_FRAME_COLS (SELECTED_FRAME (), 1 + info.srWindow.Right - |
| 674 | info.srWindow.Left); | 674 | info.srWindow.Left); |
| 675 | } | 675 | } |
| 676 | 676 | ||
diff --git a/src/w32menu.c b/src/w32menu.c index dbf14aaeeb8..872cb12e997 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -725,10 +725,8 @@ cached information about equivalent key sequences. */) | |||
| 725 | CHECK_LIVE_WINDOW (window); | 725 | CHECK_LIVE_WINDOW (window); |
| 726 | f = XFRAME (WINDOW_FRAME (XWINDOW (window))); | 726 | f = XFRAME (WINDOW_FRAME (XWINDOW (window))); |
| 727 | 727 | ||
| 728 | xpos = (FONT_WIDTH (FRAME_FONT (f)) | 728 | xpos = WINDOW_LEFT_EDGE_X (XWINDOW (window)); |
| 729 | * XFASTINT (XWINDOW (window)->left)); | 729 | ypos = WINDOW_TOP_EDGE_Y (XWINDOW (window)); |
| 730 | ypos = (FRAME_LINE_HEIGHT (f) | ||
| 731 | * XFASTINT (XWINDOW (window)->top)); | ||
| 732 | } | 730 | } |
| 733 | else | 731 | else |
| 734 | /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, | 732 | /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, |
| @@ -1601,7 +1599,7 @@ set_frame_menubar (f, first_time, deep_p) | |||
| 1601 | /* Force the window size to be recomputed so that the frame's text | 1599 | /* Force the window size to be recomputed so that the frame's text |
| 1602 | area remains the same, if menubar has just been created. */ | 1600 | area remains the same, if menubar has just been created. */ |
| 1603 | if (old_widget == NULL) | 1601 | if (old_widget == NULL) |
| 1604 | x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f)); | 1602 | x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); |
| 1605 | } | 1603 | } |
| 1606 | 1604 | ||
| 1607 | UNBLOCK_INPUT; | 1605 | UNBLOCK_INPUT; |
diff --git a/src/widget.c b/src/widget.c index afb8b700837..eaf8e66e9a9 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -183,8 +183,8 @@ get_default_char_pixel_size (ew, pixel_width, pixel_height) | |||
| 183 | int* pixel_height; | 183 | int* pixel_height; |
| 184 | { | 184 | { |
| 185 | struct frame* f = ew->emacs_frame.frame; | 185 | struct frame* f = ew->emacs_frame.frame; |
| 186 | *pixel_width = FONT_WIDTH (f->output_data.x->font); | 186 | *pixel_width = FRAME_COLUMN_WIDTH (f); |
| 187 | *pixel_height = f->output_data.x->line_height; | 187 | *pixel_height = FRAME_LINE_HEIGHT (f); |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | static void | 190 | static void |
| @@ -196,8 +196,8 @@ pixel_to_char_size (ew, pixel_width, pixel_height, char_width, char_height) | |||
| 196 | int* char_height; | 196 | int* char_height; |
| 197 | { | 197 | { |
| 198 | struct frame* f = ew->emacs_frame.frame; | 198 | struct frame* f = ew->emacs_frame.frame; |
| 199 | *char_width = PIXEL_TO_CHAR_WIDTH (f, (int) pixel_width); | 199 | *char_width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, (int) pixel_width); |
| 200 | *char_height = PIXEL_TO_CHAR_HEIGHT (f, (int) pixel_height); | 200 | *char_height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, (int) pixel_height); |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | static void | 203 | static void |
| @@ -209,8 +209,8 @@ char_to_pixel_size (ew, char_width, char_height, pixel_width, pixel_height) | |||
| 209 | Dimension* pixel_height; | 209 | Dimension* pixel_height; |
| 210 | { | 210 | { |
| 211 | struct frame* f = ew->emacs_frame.frame; | 211 | struct frame* f = ew->emacs_frame.frame; |
| 212 | *pixel_width = CHAR_TO_PIXEL_WIDTH (f, char_width); | 212 | *pixel_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, char_width); |
| 213 | *pixel_height = CHAR_TO_PIXEL_HEIGHT (f, char_height); | 213 | *pixel_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, char_height); |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | static void | 216 | static void |
| @@ -305,8 +305,8 @@ set_frame_size (ew) | |||
| 305 | */ | 305 | */ |
| 306 | 306 | ||
| 307 | /* Hairily merged geometry */ | 307 | /* Hairily merged geometry */ |
| 308 | unsigned int w = ew->emacs_frame.frame->width; | 308 | unsigned int w = FRAME_COLS (ew->emacs_frame.frame); |
| 309 | unsigned int h = ew->emacs_frame.frame->height; | 309 | unsigned int h = FRAME_LINES (ew->emacs_frame.frame); |
| 310 | 310 | ||
| 311 | Widget wmshell = get_wm_shell ((Widget) ew); | 311 | Widget wmshell = get_wm_shell ((Widget) ew); |
| 312 | /* Each Emacs shell is now independent and top-level. */ | 312 | /* Each Emacs shell is now independent and top-level. */ |
| @@ -420,7 +420,7 @@ set_frame_size (ew) | |||
| 420 | } | 420 | } |
| 421 | #endif /* 0 */ | 421 | #endif /* 0 */ |
| 422 | { | 422 | { |
| 423 | struct frame* frame = ew->emacs_frame.frame; | 423 | struct frame *f = ew->emacs_frame.frame; |
| 424 | Dimension pixel_width, pixel_height; | 424 | Dimension pixel_width, pixel_height; |
| 425 | 425 | ||
| 426 | /* Take into account the size of the scrollbar. Always use the | 426 | /* Take into account the size of the scrollbar. Always use the |
| @@ -428,18 +428,15 @@ set_frame_size (ew) | |||
| 428 | might end up with a frame width that is not a multiple of the | 428 | might end up with a frame width that is not a multiple of the |
| 429 | frame's character width which is bad for vertically split | 429 | frame's character width which is bad for vertically split |
| 430 | windows. */ | 430 | windows. */ |
| 431 | frame->output_data.x->vertical_scroll_bar_extra | 431 | f->scroll_bar_actual_width |
| 432 | = (!FRAME_HAS_VERTICAL_SCROLL_BARS (frame) | 432 | = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f); |
| 433 | ? 0 | ||
| 434 | : (FRAME_SCROLL_BAR_COLS (frame) | ||
| 435 | * FONT_WIDTH (frame->output_data.x->font))); | ||
| 436 | 433 | ||
| 437 | compute_fringe_widths (frame, 0); | 434 | compute_fringe_widths (f, 0); |
| 438 | 435 | ||
| 439 | #if 0 /* This can run Lisp code, and it is dangerous to give | 436 | #if 0 /* This can run Lisp code, and it is dangerous to give |
| 440 | out the frame to Lisp code before it officially exists. | 437 | out the frame to Lisp code before it officially exists. |
| 441 | This is handled in Fx_create_frame so not needed here. */ | 438 | This is handled in Fx_create_frame so not needed here. */ |
| 442 | change_frame_size (frame, h, w, 1, 0, 0); | 439 | change_frame_size (f, h, w, 1, 0, 0); |
| 443 | #endif | 440 | #endif |
| 444 | char_to_pixel_size (ew, w, h, &pixel_width, &pixel_height); | 441 | char_to_pixel_size (ew, w, h, &pixel_width, &pixel_height); |
| 445 | ew->core.width = pixel_width; | 442 | ew->core.width = pixel_width; |
| @@ -645,10 +642,11 @@ static void | |||
| 645 | update_various_frame_slots (ew) | 642 | update_various_frame_slots (ew) |
| 646 | EmacsFrame ew; | 643 | EmacsFrame ew; |
| 647 | { | 644 | { |
| 648 | struct x_output *x = ew->emacs_frame.frame->output_data.x; | 645 | struct frame *f = ew->emacs_frame.frame; |
| 649 | x->pixel_height = ew->core.height + x->menubar_height; | 646 | struct x_output *x = f->output_data.x; |
| 650 | x->pixel_width = ew->core.width; | 647 | FRAME_PIXEL_HEIGHT (f) = ew->core.height + x->menubar_height; |
| 651 | x->internal_border_width = ew->emacs_frame.internal_border_width; | 648 | FRAME_PIXEL_WIDTH (f) = ew->core.width; |
| 649 | f->internal_border_width = ew->emacs_frame.internal_border_width; | ||
| 652 | 650 | ||
| 653 | } | 651 | } |
| 654 | 652 | ||
| @@ -656,11 +654,12 @@ static void | |||
| 656 | update_from_various_frame_slots (ew) | 654 | update_from_various_frame_slots (ew) |
| 657 | EmacsFrame ew; | 655 | EmacsFrame ew; |
| 658 | { | 656 | { |
| 659 | struct x_output *x = ew->emacs_frame.frame->output_data.x; | 657 | struct frame *f = ew->emacs_frame.frame; |
| 660 | ew->core.height = x->pixel_height - x->menubar_height; | 658 | struct x_output *x = f->output_data.x; |
| 661 | ew->core.width = x->pixel_width; | 659 | ew->core.height = FRAME_PIXEL_HEIGHT (f) - x->menubar_height; |
| 660 | ew->core.width = FRAME_PIXEL_WIDTH (f); | ||
| 662 | ew->core.background_pixel = x->background_pixel; | 661 | ew->core.background_pixel = x->background_pixel; |
| 663 | ew->emacs_frame.internal_border_width = x->internal_border_width; | 662 | ew->emacs_frame.internal_border_width = f->internal_border_width; |
| 664 | ew->emacs_frame.font = x->font; | 663 | ew->emacs_frame.font = x->font; |
| 665 | ew->emacs_frame.foreground_pixel = x->foreground_pixel; | 664 | ew->emacs_frame.foreground_pixel = x->foreground_pixel; |
| 666 | ew->emacs_frame.cursor_color = x->cursor_pixel; | 665 | ew->emacs_frame.cursor_color = x->cursor_pixel; |
| @@ -717,7 +716,7 @@ EmacsFrameInitialize (request, new, dum1, dum2) | |||
| 717 | } | 716 | } |
| 718 | 717 | ||
| 719 | /* Update the font field in frame */ | 718 | /* Update the font field in frame */ |
| 720 | ew->emacs_frame.frame->output_data.x->font = ew->emacs_frame.font; | 719 | FRAME_FONT (ew->emacs_frame.frame) = ew->emacs_frame.font; |
| 721 | #endif | 720 | #endif |
| 722 | 721 | ||
| 723 | update_from_various_frame_slots (ew); | 722 | update_from_various_frame_slots (ew); |
| @@ -910,10 +909,8 @@ EmacsFrameSetCharSize (widget, columns, rows) | |||
| 910 | if (columns < 3) columns = 3; /* no way buddy */ | 909 | if (columns < 3) columns = 3; /* no way buddy */ |
| 911 | 910 | ||
| 912 | check_frame_size (f, &rows, &columns); | 911 | check_frame_size (f, &rows, &columns); |
| 913 | f->output_data.x->vertical_scroll_bar_extra | 912 | f->scroll_bar_actual_width |
| 914 | = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f) | 913 | = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f); |
| 915 | ? 0 | ||
| 916 | : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.x->font))); | ||
| 917 | 914 | ||
| 918 | compute_fringe_widths (f, 0); | 915 | compute_fringe_widths (f, 0); |
| 919 | 916 | ||
| @@ -923,7 +920,7 @@ EmacsFrameSetCharSize (widget, columns, rows) | |||
| 923 | /* Something is really strange here wrt to the border width: | 920 | /* Something is really strange here wrt to the border width: |
| 924 | Apparently, XtNwidth and XtNheight include the border, so we have | 921 | Apparently, XtNwidth and XtNheight include the border, so we have |
| 925 | to add it here. But the XtNborderWidth set for the widgets has | 922 | to add it here. But the XtNborderWidth set for the widgets has |
| 926 | no similarity to what f->output_data.x->border_width is set to. */ | 923 | no similarity to what f->border_width is set to. */ |
| 927 | XtVaGetValues (widget, XtNborderWidth, &border_width, NULL); | 924 | XtVaGetValues (widget, XtNborderWidth, &border_width, NULL); |
| 928 | pixel_height += 2 * border_width; | 925 | pixel_height += 2 * border_width; |
| 929 | pixel_width += 2 * border_width; | 926 | pixel_width += 2 * border_width; |
| @@ -1017,6 +1014,5 @@ widget_store_internal_border (widget) | |||
| 1017 | EmacsFrame ew = (EmacsFrame) widget; | 1014 | EmacsFrame ew = (EmacsFrame) widget; |
| 1018 | FRAME_PTR f = ew->emacs_frame.frame; | 1015 | FRAME_PTR f = ew->emacs_frame.frame; |
| 1019 | 1016 | ||
| 1020 | ew->emacs_frame.internal_border_width | 1017 | ew->emacs_frame.internal_border_width = f->internal_border_width; |
| 1021 | = f->output_data.x->internal_border_width; | ||
| 1022 | } | 1018 | } |