ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.66 by pcg, Thu Apr 8 20:31:45 2004 UTC vs.
Revision 1.67 by pcg, Sun May 9 18:19:49 2004 UTC

741 741
742 szHint.base_width = szHint.base_height = 2 * TermWin.int_bwidth; 742 szHint.base_width = szHint.base_height = 2 * TermWin.int_bwidth;
743 743
744 sb_w = mb_h = 0; 744 sb_w = mb_h = 0;
745 window_vt_x = window_vt_y = 0; 745 window_vt_x = window_vt_y = 0;
746
746 if (scrollbar_visible ()) 747 if (scrollbar_visible ())
747 { 748 {
748 sb_w = scrollbar_TotalWidth (); 749 sb_w = scrollbar_TotalWidth ();
749 szHint.base_width += sb_w; 750 szHint.base_width += sb_w;
750 if (! (Options & Opt_scrollBar_right)) 751 if (! (Options & Opt_scrollBar_right))
751 window_vt_x = sb_w; 752 window_vt_x = sb_w;
752 } 753 }
754
753 if (menubar_visible ()) 755 if (menubar_visible ())
754 { 756 {
755 mb_h = menuBar_TotalHeight (); 757 mb_h = menuBar_TotalHeight ();
756 szHint.base_height += mb_h; 758 szHint.base_height += mb_h;
757 window_vt_y = mb_h; 759 window_vt_y = mb_h;
758 } 760 }
761
759 szHint.width_inc = TermWin.fwidth; 762 szHint.width_inc = TermWin.fwidth;
760 szHint.height_inc = TermWin.fheight; 763 szHint.height_inc = TermWin.fheight;
761 szHint.min_width = szHint.base_width + szHint.width_inc; 764 szHint.min_width = szHint.base_width + szHint.width_inc;
762 szHint.min_height = szHint.base_height + szHint.height_inc; 765 szHint.min_height = szHint.base_height + szHint.height_inc;
763 766
769 else 772 else
770 { 773 {
771 MIN_IT (TermWin.width, max_width); 774 MIN_IT (TermWin.width, max_width);
772 szHint.width = szHint.base_width + TermWin.width; 775 szHint.width = szHint.base_width + TermWin.width;
773 } 776 }
777
774 if (height && height - szHint.base_height < max_height) 778 if (height && height - szHint.base_height < max_height)
775 { 779 {
776 szHint.height = height; 780 szHint.height = height;
777 TermWin.height = height - szHint.base_height; 781 TermWin.height = height - szHint.base_height;
778 } 782 }
779 else 783 else
780 { 784 {
781 MIN_IT (TermWin.height, max_height); 785 MIN_IT (TermWin.height, max_height);
782 szHint.height = szHint.base_height + TermWin.height; 786 szHint.height = szHint.base_height + TermWin.height;
783 } 787 }
788
784 if (scrollbar_visible () && (Options & Opt_scrollBar_right)) 789 if (scrollbar_visible () && (Options & Opt_scrollBar_right))
785 window_sb_x = szHint.width - sb_w; 790 window_sb_x = szHint.width - sb_w;
786 791
787 if (recalc_x) 792 if (recalc_x)
788 szHint.x += (DisplayWidth (display->display, DefaultScreen (display->display)) 793 szHint.x += (DisplayWidth (display->display, DefaultScreen (display->display))
1079 int old_width = szHint.width, old_height = szHint.height; 1084 int old_width = szHint.width, old_height = szHint.height;
1080#endif 1085#endif
1081 1086
1082 window_calc (width, height); 1087 window_calc (width, height);
1083 XSetWMNormalHints (display->display, TermWin.parent[0], &szHint); 1088 XSetWMNormalHints (display->display, TermWin.parent[0], &szHint);
1089
1084 if (!ignoreparent) 1090 if (!ignoreparent)
1085 { 1091 {
1086#ifdef SMART_RESIZE 1092#ifdef SMART_RESIZE
1087 /* 1093 /*
1088 * resize by Marius Gedminas <marius.gedminas@uosis.mif.vu.lt> 1094 * resize by Marius Gedminas <marius.gedminas@uosis.mif.vu.lt>
1123 dy /= 2; 1129 dy /= 2;
1124 1130
1125 XMoveResizeWindow (display->display, TermWin.parent[0], x + dx, y + dy, 1131 XMoveResizeWindow (display->display, TermWin.parent[0], x + dx, y + dy,
1126 szHint.width, szHint.height); 1132 szHint.width, szHint.height);
1127#else 1133#else
1128 XResizeWindow (display->display, TermWin.parent[0], szHint.width, 1134 XResizeWindow (display->display, TermWin.parent[0], szHint.width, szHint.height);
1129 szHint.height);
1130#endif 1135#endif
1131
1132 } 1136 }
1133 1137
1134 fix_screen = (TermWin.ncol != prev_ncol 1138 fix_screen = TermWin.ncol != prev_ncol || TermWin.nrow != prev_nrow;
1135 || TermWin.nrow != prev_nrow);
1136 1139
1137 if (fix_screen || width != old_width || height != old_height) 1140 if (fix_screen || width != old_width || height != old_height)
1138 { 1141 {
1139 if (scrollbar_visible ()) 1142 if (scrollbar_visible ())
1140 { 1143 {
1141 XMoveResizeWindow (display->display, scrollBar.win, window_sb_x, 1144 XMoveResizeWindow (display->display, scrollBar.win,
1145 window_sb_x, 0,
1142 0, scrollbar_TotalWidth (), szHint.height); 1146 scrollbar_TotalWidth (), szHint.height);
1143 resize_scrollbar (); 1147 resize_scrollbar ();
1144 } 1148 }
1145 1149
1146 if (menubar_visible ()) 1150 if (menubar_visible ())
1147 XMoveResizeWindow (display->display, menuBar.win, window_vt_x, 1151 XMoveResizeWindow (display->display, menuBar.win,
1152 window_vt_x, 0,
1148 0, TermWin_TotalWidth (), menuBar_TotalHeight ()); 1153 TermWin_TotalWidth (), menuBar_TotalHeight ());
1149 1154
1150 XMoveResizeWindow (display->display, TermWin.vt, window_vt_x, 1155 XMoveResizeWindow (display->display, TermWin.vt,
1151 window_vt_y, TermWin_TotalWidth (), 1156 window_vt_x, window_vt_y,
1152 TermWin_TotalHeight ()); 1157 TermWin_TotalWidth (), TermWin_TotalHeight ());
1153 scr_clear (height != old_height); 1158 scr_clear ();
1154#ifdef XPM_BACKGROUND 1159#ifdef XPM_BACKGROUND
1155 resize_pixmap (); 1160 resize_pixmap ();
1156#endif 1161#endif
1157
1158 } 1162 }
1159 1163
1160 if (fix_screen || old_height == 0) 1164 if (fix_screen || old_height == 0)
1161 { 1165 {
1162 int curr_screen = -1; 1166 int curr_screen = -1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines