Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: perryc@sun.com (Perry Cross) Newsgroups: comp.sys.sun Subject: Re: Resizing current window Message-ID: <8901210159.AA14900@wheelie.sun.com> Date: 28 Jan 89 08:15:45 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 46 Approved: Sun-Spots@rice.edu Original-Date: Fri, 20 Jan 89 17:59:16 PST X-Sun-Spots-Digest: Volume 7, Issue 126, message 10 of 12 X-Issue-Reference: v7n82 Sorry this is dated, but I fell behind reading. Someone wanted to resize his current window programmatically but I only saw the answers, not the request, hence I'm sending to Sunspots and not the requestor. Perry /* Program to resize current shelltool to 100 x 100 pixels cc -lsuntool -lsunwindow -lpixrect Of course you could just do the following: #include static char ESC = '\033'; main() { printf("%c[4;%d;%dt", ESC, 100, 100); } /* #include #include #include #include #include main(argc,argv) int argc; char *argv[]; { Rect this_rect; char *this_window = (char *)getenv("WINDOW_ME"), parent[WIN_NAMESIZE]; int fd; /* WINDOW_ME is the tty, you want the parent */ fd = open(this_window, O_RDWR); win_numbertoname(win_getlink(fd, WL_PARENT), parent); close(fd); fd = open(parent, O_RDWR); win_getrect(fd, &this_rect); this_rect.r_width = this_rect.r_height = 100; win_setrect(fd, &this_rect); close(fd); exit(0); }