Rvu window?

Hello,
Is there any way to define position and size of rvu window?

Thanks,
Marija

Rob Guglielmetti wrote:

The original question remains. Where do the defaults live? This
discussion has moved toward reinventing the wheel, if you ask me. My
question in July was how does one control default window sizes in X.

For rvu the answer is still the same: You don't.
For software that implements the standard protocol, -geometry
would be the answer.

Rvu makes the window as large as the screen allows. For this,
it relies on what the X server tells it about the screen height
and width. If on your machine the initial window is smaller than
the screen in both directions, then the X server lied to rvu.
Obviously, your X installation is (or was) broken. There's
nothing Radiance can do about that.

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

Georg Mischler wrote:

Rvu makes the window as large as the screen allows. For this,
it relies on what the X server tells it about the screen height
and width. If on your machine the initial window is smaller than
the screen in both directions, then the X server lied to rvu.
Obviously, your X installation is (or was) broken. There's
nothing Radiance can do about that.

I know, that's why I was trying to determine where these dimensions are stored in the X server configuration. I've already said, I'm trying to approach this from the X server side, not the radiance side. I realize this is a Radiance list, but I thought I'd tap the list's experience with X.

Maybe it's time to reinstall linux (or at least X) on this machine. Oh well.

···

-------------------
    Rob Guglielmetti

I think Rob is right. As I said in my initial reply, many window managers under X11 override the client window dimensions, and some can even be instructed how to override these dimensions for specific programs via a preferences file. Unfortunately, each window manager has its own way of doing this, so we need to ask the X11 gurus out there how it might be done. I don't really know how Gnome handles things, for instance. Under twm, the user can create a ".twmrc" file in their home directory, which contains the variable "MaxWindowSize" that may be set to control the maximum dimensions for any client application. Related variables are UsePPosition and RandomPlacement. I don't have a reference, but I know the Solaris window manager can direct individual client placements.

However, I agree that a -geom option would be a nice addition, and I'll look into it if there's enough interest. I'm also curious what people have to say in response to Carsten's query about output dimensions versus view angles. I always considered the latter to be more important, but I'm willing to be proved wrong democratically.

-Greg

···

From: Georg Mischler <[email protected]>
Date: November 9, 2004 8:25:49 AM PST

Rob Guglielmetti wrote:

The original question remains. Where do the defaults live? This
discussion has moved toward reinventing the wheel, if you ask me. My
question in July was how does one control default window sizes in X.

For rvu the answer is still the same: You don't.
For software that implements the standard protocol, -geometry
would be the answer.

Rvu makes the window as large as the screen allows. For this,
it relies on what the X server tells it about the screen height
and width. If on your machine the initial window is smaller than
the screen in both directions, then the X server lied to rvu.
Obviously, your X installation is (or was) broken. There's
nothing Radiance can do about that.

-schorsch

Greg Ward wrote:

I think Rob is right. As I said in my initial reply, many window managers under X11 override the client window dimensions, and some can even be instructed how to override these dimensions for specific programs via a preferences file. Unfortunately, each window manager has its own way of doing this, so we need to ask the X11 gurus out there how it might be done. I don't really know how Gnome handles things, for instance. Under twm, the user can create a ".twmrc" file in their home directory, which contains the variable "MaxWindowSize" that may be set to control the maximum dimensions for any client application. Related variables are UsePPosition and RandomPlacement. I don't have a reference, but I know the Solaris window manager can direct individual client placements.

now, this topic evolves faster than I can download mails via DSL....

The X client can deny being resized/repositioned by a window manager.

        attri.override_redirect=True; /* keep uwm silent */
        attri.backing_store=Always; /* offscreen saved pixels */
        attri.event_mask=ButtonPressMask;
        XChangeWindowAttributes(display,WID,CWEventMask|CWOverrideRedirect|CWBackingStore,&attri);

that piece of C is somewhat dated, but the override_redirect flag still lives in recent X, I bet. However, I might not be very up-to-date with my bare-metal X hacking.

Anyway- the main idea would be that the X client (rvu) has _some_ wish how large and where it wants to be. That much the client may specify and maybe (like) even enforce by the attributes, thereby ignoring any window manager.
At last, the window manager is just another X-client in the world of X, - no super natural powers assigned to it.

-Peter

PS: at least these bits belong on the dev list, mea culpa to those not used to an X-programming overdose...

···

--
pab-opto, Freiburg, Germany, http://www.pab-opto.de
[see web page to check digital email signature]

Rob Guglielmetti wrote:

I've already said, I'm trying to approach this from the X server side, not the radiance side. I realize this is a Radiance list, but I thought I'd tap the list's experience with X.

X-Server configuration is not really user-friendly :-), and there's also the (already mentioned) intermediate layer of the window manager..

But anyway, it doesn't make much sense looking for X Server settings in this case. As the name says it's a server, it serves you if you want something from it (it should do so..) X doesn't know anything about the app which is asking for a window, so it makes more sense to tell X what you want (which e.g is the thinking behind that -geometry option)

Carsten Bauer wrote:

X-Server configuration is not really user-friendly :slight_smile:

No kiddin'!

But anyway, it doesn't make much sense looking for X Server settings in this case. As the name says it's a server, it serves you if you want something from it (it should do so..) X doesn't know anything about the app which is asking for a window, so it makes more sense to tell X what you want (which e.g is the thinking behind that -geometry option)

OK, sorta makes sense.

P.S.
I tried applying some of Peter A-B's info to this problem. I created an .Xresources file (my xinitrc file seems to check for the presence of that and does the "xrdb -merge" thingy if it exists) and placed:

radiance.rvu.x:800
radiance.rvu.y:600

... in that file, but it didn't seem to work. Of course the number of ways I could have screwed up that tip is roughly equal to the number of Kerry votes that may have been swallowed by Diebold voting machines a week ago.

As usual, I am humbled by the list's collective knowledge of this stuff. I'll watch -- from the sidelines -- the continuing saga about getting this done from the application side. Looking forward to seeing how this one pans out.

···

-------------------
    Rob Guglielmetti

Rob Guglielmetti wrote:

P.S.
I tried applying some of Peter A-B's info to this problem. I created an
.Xresources file (my xinitrc file seems to check for the presence of
that and does the "xrdb -merge" thingy if it exists) and placed:

radiance.rvu.x:800
radiance.rvu.y:600

... in that file, but it didn't seem to work.

As with -geometry, that's something that the application must
actively support. There's lot of really fancy stuff that a
program could do for interacting nicely with the X11 system.
However, the design goal behind rvu was "make it paint a window
on screen with the least effort possible". It's debateable
whether it's worth the effort to change that... And the result of
such a debate would probably be determined by any volunteers.

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

Rob Guglielmetti wrote:

Carsten
Bauer wrote:

X-Server configuration is not really

user-friendly :slight_smile:

No kiddin’!

now this does belong to dev… but just to set the record straight here:

The backend of the X-server, which in many cases nowadays happens to be
the XFree86 implementation, is indeed a bit tricky. In it XFree86 lets
the user specify a lot about the grafic card and i/o config.

However, that has nothing to do with what we have been discussing here.
The schemes discussed work the same on any Xserver. And on a
traditional SGI or SUN there’s nothing equivalent to the “X-Server
configuration” file which is specific to XFree86.

But anyway, it doesn't make much sense

looking for X Server settings in this case. As the name says it’s a
server, it serves you if you want something from it (it should do so…)
X doesn’t know anything about the app which is asking for a window, so
it makes more sense to tell X what you want (which e.g is the thinking
behind that -geometry option)

OK, sorta makes sense.

Well- actually it isn’t that clear. The Xserver does know about the
application, as it offers a general hold-all for resources. That’s what
my quote from “man 7 X” stated. Applications may store config
parameters in the server and the program to store and the program to
use them could be different programs. For example, there’s ‘xrdb’ to
store stuff and rvu could ask for them and use these parameters.

So you define the appearance once per server (as long the X server
runs, typically between sessions) and re-use it as many times you like
and from any remote machine. These resources are attached to the screen
you’re sitting in front of: If you log into another machine under a
different user id, but start the same program there, you still get the
same appearance, since the program still shows its window on the same
screen. Which is nice, since your screen parameters
(color,size,pixels,brightness) are the same. I guess that was one
reason for the whole idea of putting resources into the X server.

Some programs use the mechanism, some use their own config files, some
honor both, some are not configurable at all.

So, the appearance of a program using X can be governed by a variable
sources, which may or may not be set at the time the program starts.

  1. commandline (-geometry), or hard-coded settings (like rvu at
    present), or other program specific init files
  2. X-server resources as outlined above
  3. window manager helping other programs which don’t have their own
    ideas and/or didn’t deny interference by the window manager

P.S.

I tried applying some of Peter A-B’s info to this problem. I created
an .Xresources file (my xinitrc file seems to check for the presence of
that and does the “xrdb -merge” thingy if it exists) and placed:

radiance.rvu.x:800

radiance.rvu.y:600

sigh -… - rvu, as we know it today, just doesn’t ask the server for
it. Sorry for not applying bright “example,
not yet implemented
” stickers to it in the first place.

That’s as far as I understood X some years ago, anyone with more
detailed knowledge or corrections please stand up

-Peter

···
 -- pab-opto, Freiburg, Germany, [see web page to check digital email signature]

http://www.pab-opto.de

Georg Mischler wrote:

on screen with the least effort possible". It's debateable
whether it's worth the effort to change that...>

I don't know half as much as Peter about X, but the X-rvu-connection is not
that complicated, either. Don't ask me about the question of window position, but if you provide a width and height, making the rvu window start up with these vals can be simply achieved by removing two lines of code in rv3.c. Not that much effort, is it?

-cb