… | |
… | |
155 | cursor_blink_ev (this, &rxvt_term::cursor_blink_cb), |
155 | cursor_blink_ev (this, &rxvt_term::cursor_blink_cb), |
156 | #endif |
156 | #endif |
157 | #ifdef TEXT_BLINK |
157 | #ifdef TEXT_BLINK |
158 | text_blink_ev (this, &rxvt_term::text_blink_cb), |
158 | text_blink_ev (this, &rxvt_term::text_blink_cb), |
159 | #endif |
159 | #endif |
|
|
160 | #ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING |
|
|
161 | cont_scroll_ev (this, &rxvt_term::cont_scroll_cb), |
|
|
162 | #endif |
|
|
163 | #ifdef SELECTION_SCROLLING |
|
|
164 | sel_scroll_ev (this, &rxvt_term::sel_scroll_cb), |
|
|
165 | #endif |
|
|
166 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
|
|
167 | slip_wheel_ev (this, &rxvt_term::slip_wheel_cb), |
|
|
168 | #endif |
160 | #ifdef POINTER_BLANK |
169 | #ifdef POINTER_BLANK |
161 | pointer_ev (this, &rxvt_term::pointer_cb), |
170 | pointer_ev (this, &rxvt_term::pointer_cb), |
162 | #endif |
171 | #endif |
163 | #ifdef USE_XIM |
172 | #ifdef USE_XIM |
164 | im_ev (this, &rxvt_term::im_cb), |
173 | im_ev (this, &rxvt_term::im_cb), |
… | |
… | |
285 | #ifdef CURSOR_BLINK |
294 | #ifdef CURSOR_BLINK |
286 | cursor_blink_ev.stop (); |
295 | cursor_blink_ev.stop (); |
287 | #endif |
296 | #endif |
288 | #ifdef TEXT_BLINK |
297 | #ifdef TEXT_BLINK |
289 | text_blink_ev.stop (); |
298 | text_blink_ev.stop (); |
|
|
299 | #endif |
|
|
300 | #ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING |
|
|
301 | cont_scroll_ev.stop (); |
|
|
302 | #endif |
|
|
303 | #ifdef SELECTION_SCROLLING |
|
|
304 | sel_scroll_ev.stop (); |
290 | #endif |
305 | #endif |
291 | #ifdef POINTER_BLANK |
306 | #ifdef POINTER_BLANK |
292 | pointer_ev.stop (); |
307 | pointer_ev.stop (); |
293 | #endif |
308 | #endif |
294 | |
309 | |
… | |
… | |
740 | max_height = MAX_ROWS * TermWin.fheight; |
755 | max_height = MAX_ROWS * TermWin.fheight; |
741 | |
756 | |
742 | szHint.base_width = szHint.base_height = 2 * TermWin.int_bwidth; |
757 | szHint.base_width = szHint.base_height = 2 * TermWin.int_bwidth; |
743 | |
758 | |
744 | sb_w = mb_h = 0; |
759 | sb_w = mb_h = 0; |
745 | window_vt_x = window_vt_y = 0; |
760 | window_vt_x = window_vt_y = TermWin.int_bwidth; |
|
|
761 | |
746 | if (scrollbar_visible ()) |
762 | if (scrollbar_visible ()) |
747 | { |
763 | { |
748 | sb_w = scrollbar_TotalWidth (); |
764 | sb_w = scrollbar_TotalWidth (); |
749 | szHint.base_width += sb_w; |
765 | szHint.base_width += sb_w; |
750 | if (! (Options & Opt_scrollBar_right)) |
766 | if (!(Options & Opt_scrollBar_right)) |
751 | window_vt_x = sb_w; |
767 | window_vt_x += sb_w; |
752 | } |
768 | } |
|
|
769 | |
753 | if (menubar_visible ()) |
770 | if (menubar_visible ()) |
754 | { |
771 | { |
755 | mb_h = menuBar_TotalHeight (); |
772 | mb_h = menuBar_TotalHeight (); |
756 | szHint.base_height += mb_h; |
773 | szHint.base_height += mb_h; |
757 | window_vt_y = mb_h; |
774 | window_vt_y += mb_h; |
758 | } |
775 | } |
|
|
776 | |
759 | szHint.width_inc = TermWin.fwidth; |
777 | szHint.width_inc = TermWin.fwidth; |
760 | szHint.height_inc = TermWin.fheight; |
778 | szHint.height_inc = TermWin.fheight; |
761 | szHint.min_width = szHint.base_width + szHint.width_inc; |
779 | szHint.min_width = szHint.base_width + szHint.width_inc; |
762 | szHint.min_height = szHint.base_height + szHint.height_inc; |
780 | szHint.min_height = szHint.base_height + szHint.height_inc; |
763 | |
781 | |
… | |
… | |
769 | else |
787 | else |
770 | { |
788 | { |
771 | MIN_IT (TermWin.width, max_width); |
789 | MIN_IT (TermWin.width, max_width); |
772 | szHint.width = szHint.base_width + TermWin.width; |
790 | szHint.width = szHint.base_width + TermWin.width; |
773 | } |
791 | } |
|
|
792 | |
774 | if (height && height - szHint.base_height < max_height) |
793 | if (height && height - szHint.base_height < max_height) |
775 | { |
794 | { |
776 | szHint.height = height; |
795 | szHint.height = height; |
777 | TermWin.height = height - szHint.base_height; |
796 | TermWin.height = height - szHint.base_height; |
778 | } |
797 | } |
779 | else |
798 | else |
780 | { |
799 | { |
781 | MIN_IT (TermWin.height, max_height); |
800 | MIN_IT (TermWin.height, max_height); |
782 | szHint.height = szHint.base_height + TermWin.height; |
801 | szHint.height = szHint.base_height + TermWin.height; |
783 | } |
802 | } |
|
|
803 | |
784 | if (scrollbar_visible () && (Options & Opt_scrollBar_right)) |
804 | if (scrollbar_visible () && (Options & Opt_scrollBar_right)) |
785 | window_sb_x = szHint.width - sb_w; |
805 | window_sb_x = szHint.width - sb_w; |
786 | |
806 | |
787 | if (recalc_x) |
807 | if (recalc_x) |
788 | szHint.x += (DisplayWidth (display->display, DefaultScreen (display->display)) |
808 | szHint.x += (DisplayWidth (display->display, DefaultScreen (display->display)) |
… | |
… | |
1079 | int old_width = szHint.width, old_height = szHint.height; |
1099 | int old_width = szHint.width, old_height = szHint.height; |
1080 | #endif |
1100 | #endif |
1081 | |
1101 | |
1082 | window_calc (width, height); |
1102 | window_calc (width, height); |
1083 | XSetWMNormalHints (display->display, TermWin.parent[0], &szHint); |
1103 | XSetWMNormalHints (display->display, TermWin.parent[0], &szHint); |
|
|
1104 | |
1084 | if (!ignoreparent) |
1105 | if (!ignoreparent) |
1085 | { |
1106 | { |
1086 | #ifdef SMART_RESIZE |
1107 | #ifdef SMART_RESIZE |
1087 | /* |
1108 | /* |
1088 | * resize by Marius Gedminas <marius.gedminas@uosis.mif.vu.lt> |
1109 | * resize by Marius Gedminas <marius.gedminas@uosis.mif.vu.lt> |
… | |
… | |
1123 | dy /= 2; |
1144 | dy /= 2; |
1124 | |
1145 | |
1125 | XMoveResizeWindow (display->display, TermWin.parent[0], x + dx, y + dy, |
1146 | XMoveResizeWindow (display->display, TermWin.parent[0], x + dx, y + dy, |
1126 | szHint.width, szHint.height); |
1147 | szHint.width, szHint.height); |
1127 | #else |
1148 | #else |
1128 | XResizeWindow (display->display, TermWin.parent[0], szHint.width, |
1149 | XResizeWindow (display->display, TermWin.parent[0], szHint.width, szHint.height); |
1129 | szHint.height); |
|
|
1130 | #endif |
1150 | #endif |
1131 | |
|
|
1132 | } |
1151 | } |
1133 | |
1152 | |
1134 | fix_screen = (TermWin.ncol != prev_ncol |
1153 | fix_screen = TermWin.ncol != prev_ncol || TermWin.nrow != prev_nrow; |
1135 | || TermWin.nrow != prev_nrow); |
|
|
1136 | |
1154 | |
1137 | if (fix_screen || width != old_width || height != old_height) |
1155 | if (fix_screen || width != old_width || height != old_height) |
1138 | { |
1156 | { |
1139 | if (scrollbar_visible ()) |
1157 | if (scrollbar_visible ()) |
1140 | { |
1158 | { |
1141 | XMoveResizeWindow (display->display, scrollBar.win, window_sb_x, |
1159 | XMoveResizeWindow (display->display, scrollBar.win, |
|
|
1160 | window_sb_x, 0, |
1142 | 0, scrollbar_TotalWidth (), szHint.height); |
1161 | scrollbar_TotalWidth (), szHint.height); |
1143 | resize_scrollbar (); |
1162 | resize_scrollbar (); |
1144 | } |
1163 | } |
1145 | |
1164 | |
1146 | if (menubar_visible ()) |
1165 | if (menubar_visible ()) |
1147 | XMoveResizeWindow (display->display, menuBar.win, window_vt_x, |
1166 | XMoveResizeWindow (display->display, menuBar.win, |
|
|
1167 | window_vt_x, 0, |
1148 | 0, TermWin_TotalWidth (), menuBar_TotalHeight ()); |
1168 | TermWin_TotalWidth (), menuBar_TotalHeight ()); |
1149 | |
1169 | |
1150 | XMoveResizeWindow (display->display, TermWin.vt, window_vt_x, |
1170 | XMoveResizeWindow (display->display, TermWin.vt, |
1151 | window_vt_y, TermWin_TotalWidth (), |
1171 | window_vt_x, window_vt_y, |
1152 | TermWin_TotalHeight ()); |
1172 | TermWin_TotalWidth (), TermWin_TotalHeight ()); |
1153 | scr_clear (height != old_height); |
1173 | scr_clear (); |
1154 | #ifdef XPM_BACKGROUND |
1174 | #ifdef XPM_BACKGROUND |
1155 | resize_pixmap (); |
1175 | resize_pixmap (); |
1156 | #endif |
1176 | #endif |
1157 | |
|
|
1158 | } |
1177 | } |
1159 | |
1178 | |
1160 | if (fix_screen || old_height == 0) |
1179 | if (fix_screen || old_height == 0) |
1161 | { |
1180 | { |
1162 | int curr_screen = -1; |
1181 | int curr_screen = -1; |