aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog6
-rw-r--r--src/widget.c25
2 files changed, 18 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2f599191548..f5a02483430 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12014-03-05 Paul Eggert <eggert@cs.ucla.edu>
2
3 Fix minor --enable-gcc-warnings issues.
4 * widget.c (update_various_frame_slots, EmacsFrameResize):
5 Avoid unused locals. Prefer 'if' to '#if' when either will do.
6
12014-03-04 Ken Brown <kbrown@cornell.edu> 72014-03-04 Ken Brown <kbrown@cornell.edu>
2 8
3 * gmalloc.c (aligned_alloc): Clarify the code by making `adj' 9 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
diff --git a/src/widget.c b/src/widget.c
index 838e775f918..bd0fe826e68 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -598,16 +598,18 @@ static void
598update_various_frame_slots (EmacsFrame ew) 598update_various_frame_slots (EmacsFrame ew)
599{ 599{
600 struct frame *f = ew->emacs_frame.frame; 600 struct frame *f = ew->emacs_frame.frame;
601 struct x_output *x = f->output_data.x; 601
602 /* Don't do that: It confuses the check in change_frame_size_1 whether 602 /* Don't do that: It confuses the check in change_frame_size_1 whether
603 the pixel size of the frame changed due to a change of the internal 603 the pixel size of the frame changed due to a change of the internal
604 border width. Bug#16736. */ 604 border width. Bug#16736. */
605#if 0 605 if (false)
606 FRAME_PIXEL_HEIGHT (f) = ew->core.height + x->menubar_height; 606 {
607 FRAME_PIXEL_WIDTH (f) = ew->core.width; 607 struct x_output *x = f->output_data.x;
608#endif 608 FRAME_PIXEL_HEIGHT (f) = ew->core.height + x->menubar_height;
609 f->internal_border_width = ew->emacs_frame.internal_border_width; 609 FRAME_PIXEL_WIDTH (f) = ew->core.width;
610 }
610 611
612 f->internal_border_width = ew->emacs_frame.internal_border_width;
611} 613}
612 614
613static void 615static void
@@ -682,13 +684,11 @@ EmacsFrameResize (Widget widget)
682{ 684{
683 EmacsFrame ew = (EmacsFrame)widget; 685 EmacsFrame ew = (EmacsFrame)widget;
684 struct frame *f = ew->emacs_frame.frame; 686 struct frame *f = ew->emacs_frame.frame;
685 struct x_output *x = f->output_data.x;
686 687
687#if 0 /* Always process resize requests pixelwise. Frame maximizing 688 /* Always process resize requests pixelwise. Frame maximizing
688 should work even when frame_resize_pixelwise is nil. */ 689 should work even when frame_resize_pixelwise is nil. */
689 if (frame_resize_pixelwise) 690 if (true || frame_resize_pixelwise)
690 { 691 {
691#endif /* 0 */
692 int width, height; 692 int width, height;
693 693
694 pixel_to_text_size (ew, ew->core.width, ew->core.height, &width, &height); 694 pixel_to_text_size (ew, ew->core.width, ew->core.height, &width, &height);
@@ -698,10 +698,10 @@ EmacsFrameResize (Widget widget)
698 update_various_frame_slots (ew); 698 update_various_frame_slots (ew);
699 699
700 cancel_mouse_face (f); 700 cancel_mouse_face (f);
701#if 0 /* See comment above. */
702 } 701 }
703 else 702 else
704 { 703 {
704 struct x_output *x = f->output_data.x;
705 int columns, rows; 705 int columns, rows;
706 706
707 pixel_to_char_size (ew, ew->core.width, ew->core.height, &columns, &rows); 707 pixel_to_char_size (ew, ew->core.width, ew->core.height, &columns, &rows);
@@ -717,7 +717,6 @@ EmacsFrameResize (Widget widget)
717 cancel_mouse_face (f); 717 cancel_mouse_face (f);
718 } 718 }
719 } 719 }
720#endif /* 0 */
721} 720}
722 721
723static Boolean 722static Boolean