| ︙ | | |
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
|
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
|
+
|
init_palette();
/* Screen size changed ? */
if (cfg.height != prev_cfg.height ||
cfg.width != prev_cfg.width ||
cfg.savelines != prev_cfg.savelines ||
cfg.resize_action == RESIZE_FONT ||
(cfg.resize_action == RESIZE_EITHER && IsZoomed(hwnd)) ||
cfg.resize_action == RESIZE_DISABLED)
term_size(cfg.height, cfg.width, cfg.savelines);
/* Enable or disable the scroll bar, etc */
{
LONG nflg, flag = GetWindowLong(hwnd, GWL_STYLE);
LONG nexflag, exflag =
|
| ︙ | | |
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
|
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
|
+
+
+
+
+
+
+
-
+
-
+
|
nflg = flag;
if (is_full_screen() ?
cfg.scrollbar_in_fullscreen : cfg.scrollbar)
nflg |= WS_VSCROLL;
else
nflg &= ~WS_VSCROLL;
if (cfg.resize_action == RESIZE_DISABLED ||
is_full_screen())
nflg &= ~WS_THICKFRAME;
else
nflg |= WS_THICKFRAME;
if (cfg.resize_action == RESIZE_DISABLED)
nflg &= ~(WS_THICKFRAME | WS_MAXIMIZEBOX);
nflg &= ~WS_MAXIMIZEBOX;
else
nflg |= (WS_THICKFRAME | WS_MAXIMIZEBOX);
nflg |= WS_MAXIMIZEBOX;
if (nflg != flag || nexflag != exflag) {
if (nflg != flag)
SetWindowLong(hwnd, GWL_STYLE, nflg);
if (nexflag != exflag)
SetWindowLong(hwnd, GWL_EXSTYLE, nexflag);
|
| ︙ | | |
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
|
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
|
+
+
+
+
+
+
|
LOWORD(lParam), HIWORD(lParam)));
#endif
if (wParam == SIZE_MINIMIZED)
SetWindowText(hwnd,
cfg.win_name_always ? window_name : icon_name);
if (wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED)
SetWindowText(hwnd, window_name);
if (wParam == SIZE_RESTORED)
clear_full_screen();
if (wParam == SIZE_MAXIMIZED && fullscr_on_max) {
make_full_screen();
fullscr_on_max = FALSE;
}
if (cfg.resize_action == RESIZE_DISABLED) {
/* A resize, well it better be a minimize. */
reset_window(-1);
} else {
int width, height, w, h;
|
| ︙ | | |
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
|
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
|
-
-
-
-
|
w = width / font_width;
if (w < 1) w = 1;
h = height / font_height;
if (h < 1) h = 1;
term_size(h, w, cfg.savelines);
}
if (fullscr_on_max)
make_full_screen();
fullscr_on_max = FALSE;
reset_window(0);
} else if (wParam == SIZE_RESTORED && was_zoomed) {
was_zoomed = 0;
clear_full_screen();
if (cfg.resize_action == RESIZE_TERM)
term_size(prev_rows, prev_cols, cfg.savelines);
if (cfg.resize_action != RESIZE_FONT)
reset_window(2);
else
reset_window(0);
}
|
| ︙ | | |
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
|
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
|
-
+
+
+
+
+
|
*/
void clear_full_screen()
{
DWORD oldstyle, style;
/* Reinstate the window furniture. */
style = oldstyle = GetWindowLong(hwnd, GWL_STYLE);
style |= WS_CAPTION | WS_BORDER | WS_THICKFRAME;
style |= WS_CAPTION | WS_BORDER;
if (cfg.resize_action == RESIZE_DISABLED)
style &= ~WS_THICKFRAME;
else
style |= WS_THICKFRAME;
if (cfg.scrollbar)
style |= WS_VSCROLL;
else
style &= ~WS_VSCROLL;
if (style != oldstyle) {
SetWindowLong(hwnd, GWL_STYLE, style);
SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
|
| ︙ | | |