|
119 | 119 | #include <sys/stat.h>
|
120 | 120 |
|
121 | 121 | #define isatty(a) WSHELPisatty(a)
|
| 122 | + |
| 123 | +// Windows Console screen size change related |
| 124 | +extern int ScreenX; |
| 125 | +extern int ScrollBottom; |
| 126 | +int win_received_window_change_signal = 1; |
| 127 | + |
122 | 128 | #endif
|
123 | 129 |
|
124 | 130 | /* import options */
|
@@ -563,6 +569,25 @@ client_check_window_change(void)
|
563 | 569 | packet_put_int((u_int)ws.ws_ypixel);
|
564 | 570 | packet_send();
|
565 | 571 | }
|
| 572 | +#else |
| 573 | + |
| 574 | + if (! win_received_window_change_signal) |
| 575 | + return; |
| 576 | + /** XXX race */ |
| 577 | + win_received_window_change_signal = 0; |
| 578 | + |
| 579 | + debug2("client_check_window_change: changed"); |
| 580 | + |
| 581 | + if (compat20) { |
| 582 | + channel_send_window_changes(ScreenX, ScrollBottom, 640, 480); |
| 583 | + } else { |
| 584 | + packet_start(SSH_CMSG_WINDOW_SIZE); |
| 585 | + packet_put_int((u_int)ScreenX); |
| 586 | + packet_put_int((u_int)ScrollBottom); |
| 587 | + packet_put_int((u_int)640); |
| 588 | + packet_put_int((u_int)480); |
| 589 | + packet_send(); |
| 590 | + } |
566 | 591 | #endif /* !WIN32_FIXME */
|
567 | 592 | }
|
568 | 593 |
|
@@ -2571,11 +2596,11 @@ client_session2_setup(int id, int want_tty, int want_subsystem,
|
2571 | 2596 | tty_make_modes(-1, tiop);
|
2572 | 2597 |
|
2573 | 2598 | #else
|
2574 |
| - packet_put_cstring(term != NULL ? term : ""); |
2575 |
| - packet_put_int((u_int) 80 /*ws.ws_col*/); |
2576 |
| - packet_put_int((u_int) 25 /*ws.ws_row*/); |
2577 |
| - packet_put_int((u_int) 640 /*ws.ws_xpixel*/); |
2578 |
| - packet_put_int((u_int) 480 /*ws.ws_ypixel*/); |
| 2599 | + packet_put_cstring(term != NULL ? term : "vt220"); |
| 2600 | + packet_put_int((u_int) ScreenX); |
| 2601 | + packet_put_int((u_int) ScrollBottom); |
| 2602 | + packet_put_int((u_int) 640); |
| 2603 | + packet_put_int((u_int) 480); |
2579 | 2604 | tty_make_modes(-1, NULL);
|
2580 | 2605 | #endif /* else !WIN32_FIXME */
|
2581 | 2606 | packet_send();
|
|
0 commit comments