SetPort(GetWindowPort(s->window));
SetPort((GrafPtr)GetWindowPort(s->window));
static void mac_drawgrowicon(Session *s) {    Rect clip;    RgnHandle savergn;    SetPort(GetWindowPort(s->window));    /*     * Stop DrawGrowIcon giving us space for a horizontal scrollbar     * See Tech Note TB575 for details.     */#if TARGET_API_MAC_CARBON    GetPortBounds(GetWindowPort(s->window), &clip);#else    clip = s->window->portRect;#endif    clip.left = clip.right - 15;    savergn = NewRgn();    GetClip(savergn);    ClipRect(&clip);    DrawGrowIcon(s->window);    SetClip(savergn);    DisposeRgn(savergn);}    