ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/x11image.c
(Generate patch)

Comparing ray/src/px/x11image.c (file contents):
Revision 2.19 by greg, Thu Feb 4 21:00:32 1993 UTC vs.
Revision 2.20 by greg, Fri Feb 12 18:03:08 1993 UTC

# Line 234 | Line 234 | init()                 /* get data and open window */
234          getbestvis();
235                                  /* store image */
236          getras();
237 +                                /* get size and position */
238 +        bzero((char *)&oursizhints, sizeof(oursizhints));
239 +        oursizhints.width = xmax; oursizhints.height = ymax;
240 +        if (geometry != NULL) {
241 +                i = XParseGeometry(geometry, &oursizhints.x, &oursizhints.y,
242 +                                (unsigned *)&oursizhints.width,
243 +                                (unsigned *)&oursizhints.height);
244 +                if ((i&(WidthValue|HeightValue)) == (WidthValue|HeightValue))
245 +                        oursizhints.flags |= USSize;
246 +                else
247 +                        oursizhints.flags |= PSize;
248 +                if ((i&(XValue|YValue)) == (XValue|YValue)) {
249 +                        oursizhints.flags |= USPosition;
250 +                        if (i & XNegative)
251 +                                oursizhints.x += DisplayWidth(thedisplay,
252 +                                ourscreen)-1-oursizhints.width-2*BORWIDTH;
253 +                        if (i & YNegative)
254 +                                oursizhints.y += DisplayHeight(thedisplay,
255 +                                ourscreen)-1-oursizhints.height-2*BORWIDTH;
256 +                }
257 +        }
258                                  /* open window */
259          ourwinattr.border_pixel = ourblack;
260          ourwinattr.background_pixel = ourwhite;
261          ourwinattr.colormap = XCreateColormap(thedisplay, ourroot,
262                          ourvis.visual, AllocNone);
263 <        wind = XCreateWindow(thedisplay, ourroot, 0, 0, xmax, ymax, BORWIDTH,
263 >        wind = XCreateWindow(thedisplay, ourroot, oursizhints.x, oursizhints.y,
264 >                        oursizhints.width, oursizhints.height, BORWIDTH,
265                          ourvis.depth, InputOutput, ourvis.visual,
266                          CWBackPixel|CWBorderPixel|CWColormap, &ourwinattr);
267          if (wind == 0)
# Line 258 | Line 280 | init()                 /* get data and open window */
280          XDefineCursor(thedisplay, wind, XCreateFontCursor(thedisplay,
281                          XC_diamond_cross));
282          XStoreName(thedisplay, wind, fname == NULL ? progname : fname);
283 <        if (geometry != NULL) {
262 <                bzero((char *)&oursizhints, sizeof(oursizhints));
263 <                i = XParseGeometry(geometry, &oursizhints.x, &oursizhints.y,
264 <                                (unsigned *)&oursizhints.width,
265 <                                (unsigned *)&oursizhints.height);
266 <                if ((i&(WidthValue|HeightValue)) == (WidthValue|HeightValue))
267 <                        oursizhints.flags |= USSize;
268 <                else {
269 <                        oursizhints.width = xmax;
270 <                        oursizhints.height = ymax;
271 <                        oursizhints.flags |= PSize;
272 <                }
273 <                if ((i&(XValue|YValue)) == (XValue|YValue)) {
274 <                        oursizhints.flags |= USPosition;
275 <                        if (i & XNegative)
276 <                                oursizhints.x += DisplayWidth(thedisplay,
277 <                                ourscreen)-1-oursizhints.width-2*BORWIDTH;
278 <                        if (i & YNegative)
279 <                                oursizhints.y += DisplayHeight(thedisplay,
280 <                                ourscreen)-1-oursizhints.height-2*BORWIDTH;
281 <                }
283 >        if (oursizhints.flags)
284                  XSetNormalHints(thedisplay, wind, &oursizhints);
283        }
285          ourxwmhints.flags = InputHint|IconPixmapHint;
286          ourxwmhints.input = True;
287          ourxwmhints.icon_pixmap = XCreateBitmapFromData(thedisplay,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines