Path: utzoo!attcan!uunet!mcvax!inria!irisa!servix.irisa.fr!engel From: engel@servix.irisa.fr (Jean Christophe Engel) Newsgroups: comp.windows.x Subject: How to track window size changes (X11R3 *without* the Toolkit) Keywords: size changes Message-ID: <1228@irisa.UUCP> Date: 26 May 89 15:31:08 GMT Sender: news@irisa.UUCP Reply-To: engel@servix.irisa.fr Organization: IRISA Lines: 28 I have written a simple application that draws line segments in a window using *only* Xlib and not the XToolKit. When a user changes the size of the window with his favorite Window Manager, I want to adjust the size of the graphics to the new size of the window. XSelectInput(dpy, win, ExposureMask | ResizeRedirectMask) in order to enable my program to be notified when either a "Expose" or "Resize" event occurs. 2. To get the *new* dimensions of the window. I thought that a call to XGetWindowAttributes(dpy, win, &win_att) would do the job. The XWindowAttributes win_att structure indeed contains info about the window, but the width and height correspond to the *initial* size of the window, and *not* the new one. Did I miss something, or what's wrong with the way I do ? PS: Btw, I created the window with: win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 100, 100, dimx, dimy, 2, /*--- Border width ---*/ BlackPixel(dpy, 0), WhitePixel(dpy, 0)); Thanx for any reply ... -------------------------------------------------------------------------- | Jean-Christophe Engel (Equipe TEMIS) Phone: +33 99 36 20 00 | | IRISA Fax: 99 38 38 32 | | Campus Universitaire de Beaulieu Telex: UNIRISA 950 473F | | 35042 RENNES Cedex - FRANCE E-mail: engel@irisa.fr | --------------------------------------------------------------------------