… | |
… | |
1031 | * -------------------------------------------------------------------- */ |
1031 | * -------------------------------------------------------------------- */ |
1032 | void |
1032 | void |
1033 | rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent) |
1033 | rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent) |
1034 | { |
1034 | { |
1035 | int fix_screen; |
1035 | int fix_screen; |
1036 | int old_width = szHint.width, old_height = szHint.height; |
1036 | int old_width = szHint.width; |
|
|
1037 | int old_height = szHint.height; |
1037 | dDisp; |
1038 | dDisp; |
1038 | |
1039 | |
1039 | window_calc (newwidth, newheight); |
1040 | window_calc (newwidth, newheight); |
1040 | XSetWMNormalHints (disp, parent[0], &szHint); |
1041 | XSetWMNormalHints (disp, parent[0], &szHint); |
1041 | |
1042 | |
… | |
… | |
1063 | { |
1064 | { |
1064 | x -= x1; |
1065 | x -= x1; |
1065 | y -= y1; |
1066 | y -= y1; |
1066 | } |
1067 | } |
1067 | |
1068 | |
1068 | x1 = (DisplayWidth (disp, display->screen) - old_width) / 2; |
1069 | x1 = (DisplayWidth (disp, display->screen) - old_width ) / 2; |
1069 | y1 = (DisplayHeight (disp, display->screen) - old_height) / 2; |
1070 | y1 = (DisplayHeight (disp, display->screen) - old_height) / 2; |
1070 | dx = old_width - szHint.width; |
1071 | dx = old_width - szHint.width; |
1071 | dy = old_height - szHint.height; |
1072 | dy = old_height - szHint.height; |
1072 | |
1073 | |
1073 | /* Check position of the center of the window */ |
1074 | /* Check position of the center of the window */ |
1074 | if (x < x1) /* left half */ |
1075 | if (x < x1) /* left half */ |
1075 | dx = 0; |
1076 | dx = 0; |
… | |
… | |
1108 | resize_pixmap (); |
1109 | resize_pixmap (); |
1109 | #endif |
1110 | #endif |
1110 | } |
1111 | } |
1111 | |
1112 | |
1112 | if (fix_screen || old_height == 0) |
1113 | if (fix_screen || old_height == 0) |
1113 | { |
|
|
1114 | int curr_screen = -1; |
|
|
1115 | int old_ncol = prev_ncol; |
|
|
1116 | |
|
|
1117 | /* scr_reset only works on the primary screen */ |
|
|
1118 | if (old_height) /* this is not the first time through */ |
|
|
1119 | { |
|
|
1120 | unsigned int ocol = ncol; |
|
|
1121 | ncol = prev_ncol; // save b/c scr_blank_screen_mem uses this |
|
|
1122 | curr_screen = scr_change_screen (PRIMARY); |
|
|
1123 | ncol = ocol; |
|
|
1124 | } |
|
|
1125 | |
|
|
1126 | scr_reset (); |
1114 | scr_reset (); |
1127 | |
|
|
1128 | if (curr_screen >= 0) /* this is not the first time through */ |
|
|
1129 | { |
|
|
1130 | scr_change_screen (curr_screen); |
|
|
1131 | selection_check (old_ncol != ncol ? 4 : 0); |
|
|
1132 | } |
|
|
1133 | } |
|
|
1134 | |
|
|
1135 | old_width = szHint.width; |
|
|
1136 | old_height = szHint.height; |
|
|
1137 | |
1115 | |
1138 | #ifdef XPM_BACKGROUND |
1116 | #ifdef XPM_BACKGROUND |
1139 | if (pixmap) |
1117 | if (pixmap) |
1140 | scr_touch (false); |
1118 | scr_touch (false); |
1141 | #endif |
1119 | #endif |