aboutsummaryrefslogtreecommitdiffstats
path: root/src/widget.c
diff options
context:
space:
mode:
authorJoakim Verona2015-02-08 21:55:28 +0100
committerJoakim Verona2015-02-08 21:55:28 +0100
commit5e1d5ef39ca0d2fbff26d659f2ec6ce863b14529 (patch)
tree860e0d53399626aee6249ebb5f972879f403b228 /src/widget.c
parent148262ce3db990ed16989341345e232570b3a338 (diff)
parent7d631aa0ffab875e4979727f632703ad5b4100a2 (diff)
downloademacs-xwidget.tar.gz
emacs-xwidget.zip
merge masterxwidget
Diffstat (limited to 'src/widget.c')
-rw-r--r--src/widget.c39
1 files changed, 10 insertions, 29 deletions
diff --git a/src/widget.c b/src/widget.c
index c4d69407176..acf559f313b 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -460,7 +460,7 @@ update_wm_hints (EmacsFrame ew)
460 base_width = (wmshell->core.width - ew->core.width 460 base_width = (wmshell->core.width - ew->core.width
461 + (rounded_width - (char_width * cw))); 461 + (rounded_width - (char_width * cw)));
462 base_height = (wmshell->core.height - ew->core.height 462 base_height = (wmshell->core.height - ew->core.height
463 + (rounded_height - (char_height * ch))); 463 + (rounded_height - (char_height * ch)));
464 464
465 /* This is kind of sleazy, but I can't see how else to tell it to 465 /* This is kind of sleazy, but I can't see how else to tell it to
466 make it mark the WM_SIZE_HINTS size as user specified. 466 make it mark the WM_SIZE_HINTS size as user specified.
@@ -573,39 +573,20 @@ EmacsFrameResize (Widget widget)
573{ 573{
574 EmacsFrame ew = (EmacsFrame)widget; 574 EmacsFrame ew = (EmacsFrame)widget;
575 struct frame *f = ew->emacs_frame.frame; 575 struct frame *f = ew->emacs_frame.frame;
576 int width, height;
576 577
577 /* Always process resize requests pixelwise. Frame maximizing 578 pixel_to_text_size (ew, ew->core.width, ew->core.height, &width, &height);
578 should work even when frame_resize_pixelwise is nil. */
579 if (true || frame_resize_pixelwise)
580 {
581 int width, height;
582
583 pixel_to_text_size (ew, ew->core.width, ew->core.height, &width, &height);
584 change_frame_size (f, width, height, 0, 1, 0, 1);
585 579
586 update_wm_hints (ew); 580 frame_size_history_add
587 update_various_frame_slots (ew); 581 (f, QEmacsFrameResize, width, height,
582 list2 (make_number (ew->core.width), make_number (ew->core.height)));
588 583
589 cancel_mouse_face (f); 584 change_frame_size (f, width, height, 0, 1, 0, 1);
590 }
591 else
592 {
593 struct x_output *x = f->output_data.x;
594 int columns, rows;
595 585
596 pixel_to_char_size (ew, ew->core.width, ew->core.height, &columns, &rows); 586 update_wm_hints (ew);
597 if (columns != FRAME_COLS (f) 587 update_various_frame_slots (ew);
598 || rows != FRAME_LINES (f)
599 || ew->core.width != FRAME_PIXEL_WIDTH (f)
600 || ew->core.height + x->menubar_height != FRAME_PIXEL_HEIGHT (f))
601 {
602 change_frame_size (f, columns, rows, 0, 1, 0, 0);
603 update_wm_hints (ew);
604 update_various_frame_slots (ew);
605 588
606 cancel_mouse_face (f); 589 cancel_mouse_face (f);
607 }
608 }
609} 590}
610 591
611static XtGeometryResult 592static XtGeometryResult