diff --git a/ssheven-console.c b/ssheven-console.c index 8d61402..14a94ad 100644 --- a/ssheven-console.c +++ b/ssheven-console.c @@ -97,6 +97,19 @@ void draw_screen(Rect* r) TextFont(save_font); TextSize(save_font_size); TextFace(save_font_face); + + // draw the grow icon in the bottom right corner, but not the scroll bars + // yes, this is really awkward + MacRegion bottom_right_corner = { 10, con.win->portRect}; + MacRegion* brc = &bottom_right_corner; + MacRegion** old = con.win->clipRgn; + + bottom_right_corner.rgnBBox.top = bottom_right_corner.rgnBBox.bottom - 15; + bottom_right_corner.rgnBBox.left = bottom_right_corner.rgnBBox.right - 15; + + con.win->clipRgn = &brc; + DrawGrowIcon(con.win); + con.win->clipRgn = old; } void ruler(Rect* r) diff --git a/ssheven.c b/ssheven.c index 14e405a..5552ce5 100644 --- a/ssheven.c +++ b/ssheven.c @@ -270,6 +270,7 @@ void resize_con_window(WindowPtr eventWin, EventRecord event) Rect window_limits = { .top = con.cell_height*2 + 2, .bottom = con.cell_height*100 + 2, .left = con.cell_width*10 + 4, .right = con.cell_width*200 + 4 }; long growResult = GrowWindow(eventWin, event.where, &window_limits); + if (growResult != 0) { int height = growResult >> 16; @@ -280,7 +281,8 @@ void resize_con_window(WindowPtr eventWin, EventRecord event) int next_width = width - ((width - 4) % con.cell_width); SizeWindow(eventWin, next_width, next_height, true); - // don't need to erase and invalidate, since vterm callbacks on resize + EraseRect(&(con.win->portRect)); + InvalRect(&(con.win->portRect)); con.size_x = (next_width - 4)/con.cell_width; con.size_y = (next_height - 2)/con.cell_height;