SGI's migration to X

Tim Moore moore%cdr.utah.edu at cs.utah.edu
Sat Sep 1 01:24:31 AEST 1990


In article <SLEHAR.90Aug31102639 at cochlea.bu.edu> slehar at cochlea.bu.edu (Steve Lehar) writes:
>
>When I complain that XImages must be transmitted pixel by pixel you say...
>
>||> Not true.  You can build and send the entire image in one go.  See
>||> XPutImage.
>
>Yes, you can send the image  to the  screen with XPutImage(), but how do
>you get your array of image data INTO the XImage BEFORE you send it to
>the screen? XPutPixel() is the only routine provided!
>

That's what XPutPixel() does. It's a client-side operation; an image
resides in the client's memory, so creating it doesn't involve any
transactions with the server. There isn't any network traffic until
you send the image to the server with XPutImage().

Just because a function has X in its name doesn't mean that it
communicates with the server.

>And when I complain that I can't specify the X window position from my
>code, you say...
>
>||> Also not true.  You can specify where you want the  window  to go.
>||> At  the  application level,    most applications will   accept the
>||> -geometry option -- at the program level, see XSetWMNormalHints.
>
>Yes they  do, but what  about if I  am WRITING  the application? I can
>make my  program receive the -geometry flag  (or reasonable facsimile)
>but what do I DO with that information?  When I  open my XWindow I use
>the call

Like the man said, see XSetWMNormalHints.

>
>  win = XCreateWindow(display, RootWindow(display, screen),
>                      xsh.x, xsh.y, xsh.width, xsh.height,
>                      bw, vTemplate.depth, InputOutput, visual,
>                      valuemask, &attrib);
>
>Note that there is no argument for x and y screen location!  How do I
>tell this XWindow where to appear?

It is true that you can't specify with certainty where your window
will end up on the screen. The rationale for this is that your window
manager might have a different idea about where the newly created
window should go. Hence, you give the window manager "hints".

Tim Moore                     moore at cs.utah.edu {bellcore,hplabs}!utah-cs!moore
"Ah, youth. Ah, statute of limitations."
		-John Waters



More information about the Comp.sys.sgi mailing list