Path: utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!mips!sgi!shinobu!odin!sgihub!dragon!eukanuba.wpd.sgi.com!mikey From: mikey@eukanuba.wpd.sgi.com (Mike Yang) Newsgroups: comp.sys.sgi Subject: Re: SGI's migration to X Message-ID: <1990Sep4.175023.20768@relay.wpd.sgi.com> Date: 4 Sep 90 17:50:23 GMT References: <208@voodoo.UUCP> Sender: news@relay.wpd.sgi.com ( CNews Account ) Reply-To: mikey@sgi.com Organization: Silicon Graphics, Inc. Lines: 63 In article , slehar@cochlea.bu.edu (Steve Lehar) writes: |> |> When I complain that X doesn't allow advance positioning of the |> window, joe@etac632 says... |> |> ----------------------------------------------------------------------- |> | There is an XSizeHints struct which includes the position and size. Be |> | sure to set the flags parameter to USPosition. The helloworld program |> | in the "Introduction to the X Window System" by Oliver Jones shows an |> | example of this which we used... |> ----------------------------------------------------------------------- |> |> I followed that same helloworld template, but somehow, when I modified |> it to do images, it ceased to go to where it was supposed to. I |> loaded up my XSizeHints as required... |> |> /**** set window position and size hints ****/ |> xsh.flags = (PPosition | PSize); It might help if you set the USPosition flag (reread what you were instructed to do). In any case, these are "hints" and not guaranteed to work. For instance, suppose I want my window manager to always let me position a client window regardless of what the application developer wanted to place it. In X, it's possible to implement such a feature in a window manager. For this reason, X differentiates between user-specified positions (USPosition) and program-specified positions (PPosition). Window managers are expected (but not forced) to honor user-specified positions, but program-specified positions can be overriden. For instance, if the window manager tiles windows or if it's configured as in my example. |> but it simply ignored this "hint". bernie@ecr.mu.oz.au (Bernie Kirby) |> tells me that the secret is ... |> |> "you have to set the "override_redirect" thingy to True somewhere." This works, but is not the solution. Setting the override_redirect attribute for a window is well-documented, and says that the window manager should not get involved. When this happens, of course your window is placed where you wanted it. But then, you can't do things like iconify it or move it. |> Well, this is likely to be the kind of thing that has to be done. Do |> you see my complaint? This kind of thing is typical of X. If it was |> better designed, the window position should either be defined in the |> window hints structure, or should be a parameter to XCreateWindows(). |> In fact, you can be intimately familiar with BOTH of these things and |> STILL not be able to position your window because you haven't read |> about the undocumented "override_redirect" thingy! X is just full of |> such hidden mysteries! I don't doubt that these things can be done |> somehow, but I'm afraid you need a PhD in XOlogy to just open a window |> and put an image in it! You don't need a Ph.D. Sometimes, you just have to read the manual. ----------------------------------------------------------------------- Mike Yang Silicon Graphics, Inc. mikey@sgi.com 415/335-1786