aboutsummaryrefslogtreecommitdiffstats
path: root/src/widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/widget.c')
-rw-r--r--src/widget.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/widget.c b/src/widget.c
index bd0fe826e68..45118a88730 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -404,7 +404,6 @@ set_frame_size (EmacsFrame ew)
404 } 404 }
405#endif /* 0 */ 405#endif /* 0 */
406 { 406 {
407 struct frame *f = ew->emacs_frame.frame;
408 Dimension pixel_width, pixel_height; 407 Dimension pixel_width, pixel_height;
409 408
410 /* Take into account the size of the scrollbar. Always use the 409 /* Take into account the size of the scrollbar. Always use the
@@ -413,8 +412,6 @@ set_frame_size (EmacsFrame ew)
413 frame's character width which is bad for vertically split 412 frame's character width which is bad for vertically split
414 windows. */ 413 windows. */
415 414
416 compute_fringe_widths (f, 0);
417
418#if 0 /* This can run Lisp code, and it is dangerous to give 415#if 0 /* This can run Lisp code, and it is dangerous to give
419 out the frame to Lisp code before it officially exists. 416 out the frame to Lisp code before it officially exists.
420 This is handled in Fx_create_frame so not needed here. */ 417 This is handled in Fx_create_frame so not needed here. */
@@ -472,10 +469,6 @@ update_wm_hints (EmacsFrame ew)
472 /* This happens when the frame is just created. */ 469 /* This happens when the frame is just created. */
473 if (! wmshell) return; 470 if (! wmshell) return;
474 471
475#if 0
476 check_frame_size (ew->emacs_frame.frame, &min_cols, &min_rows, 0);
477#endif
478
479 pixel_to_char_size (ew, ew->core.width, ew->core.height, 472 pixel_to_char_size (ew, ew->core.width, ew->core.height,
480 &char_width, &char_height); 473 &char_width, &char_height);
481 char_to_pixel_size (ew, char_width, char_height, 474 char_to_pixel_size (ew, char_width, char_height,
@@ -690,6 +683,15 @@ EmacsFrameResize (Widget widget)
690 if (true || frame_resize_pixelwise) 683 if (true || frame_resize_pixelwise)
691 { 684 {
692 int width, height; 685 int width, height;
686/** int width = (ew->core.width **/
687/** - FRAME_SCROLL_BAR_AREA_WIDTH (f) **/
688/** - FRAME_TOTAL_FRINGE_WIDTH (f) **/
689/** - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); **/
690
691/** int height = (ew->core.height **/
692/** - FRAME_TOOLBAR_HEIGHT (f) **/
693/** - FRAME_SCROLL_BAR_AREA_HEIGHT (f) **/
694/** - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); **/
693 695
694 pixel_to_text_size (ew, ew->core.width, ew->core.height, &width, &height); 696 pixel_to_text_size (ew, ew->core.width, ew->core.height, &width, &height);
695 change_frame_size (f, width, height, 0, 1, 0, 1); 697 change_frame_size (f, width, height, 0, 1, 0, 1);
@@ -829,7 +831,8 @@ EmacsFrameSetCharSize (Widget widget, int columns, int rows)
829 EmacsFrame ew = (EmacsFrame) widget; 831 EmacsFrame ew = (EmacsFrame) widget;
830 struct frame *f = ew->emacs_frame.frame; 832 struct frame *f = ew->emacs_frame.frame;
831 833
832 x_set_window_size (f, 0, columns, rows, 0); 834 if (!frame_inhibit_resize (f, 0) && !frame_inhibit_resize (f, 1))
835 x_set_window_size (f, 0, columns, rows, 0);
833} 836}
834 837
835 838