… | |
… | |
710 | // size, i.e., when the wm does not honour our size hints, there are |
710 | // size, i.e., when the wm does not honour our size hints, there are |
711 | // extra areas not covered by the terminal screen. Such gaps, when a |
711 | // extra areas not covered by the terminal screen. Such gaps, when a |
712 | // bg pixmap is set, would have to be cleared manually to properly |
712 | // bg pixmap is set, would have to be cleared manually to properly |
713 | // refresh the background. We take the simpler route and shrink the |
713 | // refresh the background. We take the simpler route and shrink the |
714 | // vt window so as to avoid creating gaps. |
714 | // vt window so as to avoid creating gaps. |
715 | width = ncol * fwidth; |
715 | vt_width = ncol * fwidth; |
716 | height = nrow * fheight; |
716 | vt_height = nrow * fheight; |
717 | } |
717 | } |
718 | |
718 | |
719 | /*----------------------------------------------------------------------*/ |
719 | /*----------------------------------------------------------------------*/ |
720 | /* |
720 | /* |
721 | * Tell the teletype handler what size the window is. |
721 | * Tell the teletype handler what size the window is. |
… | |
… | |
729 | |
729 | |
730 | struct winsize ws; |
730 | struct winsize ws; |
731 | |
731 | |
732 | ws.ws_col = ncol; |
732 | ws.ws_col = ncol; |
733 | ws.ws_row = nrow; |
733 | ws.ws_row = nrow; |
734 | ws.ws_xpixel = width; |
734 | ws.ws_xpixel = vt_width; |
735 | ws.ws_ypixel = height; |
735 | ws.ws_ypixel = vt_height; |
736 | ioctl (pty->pty, TIOCSWINSZ, &ws); |
736 | ioctl (pty->pty, TIOCSWINSZ, &ws); |
737 | |
737 | |
738 | #if 0 |
738 | #if 0 |
739 | // TIOCSWINSZ is supposed to do this automatically and correctly |
739 | // TIOCSWINSZ is supposed to do this automatically and correctly |
740 | if (cmd_pid) /* force through to the command */ |
740 | if (cmd_pid) /* force through to the command */ |
… | |
… | |
1075 | if (scrollBar.state) |
1075 | if (scrollBar.state) |
1076 | scrollBar.resize (); |
1076 | scrollBar.resize (); |
1077 | |
1077 | |
1078 | XMoveResizeWindow (dpy, vt, |
1078 | XMoveResizeWindow (dpy, vt, |
1079 | window_vt_x, window_vt_y, |
1079 | window_vt_x, window_vt_y, |
1080 | width, height); |
1080 | vt_width, vt_height); |
1081 | |
1081 | |
1082 | #ifdef HAVE_BG_PIXMAP |
1082 | #ifdef HAVE_BG_PIXMAP |
1083 | if (bg_window_size_sensitive ()) |
1083 | if (bg_window_size_sensitive ()) |
1084 | update_background (); |
1084 | update_background (); |
1085 | #endif |
1085 | #endif |
… | |
… | |
1110 | newwidth = wattr.width - szHint.base_width; |
1110 | newwidth = wattr.width - szHint.base_width; |
1111 | if (newheight == 0) |
1111 | if (newheight == 0) |
1112 | newheight = wattr.height - szHint.base_height; |
1112 | newheight = wattr.height - szHint.base_height; |
1113 | } |
1113 | } |
1114 | |
1114 | |
1115 | if (newwidth != width || newheight != height) |
1115 | if (newwidth != vt_width || newheight != vt_height) |
1116 | { |
1116 | { |
1117 | newwidth += szHint.base_width; |
1117 | newwidth += szHint.base_width; |
1118 | newheight += szHint.base_height; |
1118 | newheight += szHint.base_height; |
1119 | resize_all_windows (newwidth, newheight, 0); |
1119 | resize_all_windows (newwidth, newheight, 0); |
1120 | } |
1120 | } |