tonyw@hpfcbig.SDE.HP.COM (Anthony Walker) (11/22/90)
I'm confused about the behavior of the -geometry command line option with Motif applications and mwm or vuewm. The format is: -geometry +-x+-y when specifying only location. + arguments reference the top left corner of the root window and - arguments reference the bottom right corner of the root window. The confusing part is what corner of the client is referred to. I have a few examples below that yield inconsistent conclusions: 1) xclock -geometry +10+10 RESULT: ---------------------- | | | ---- | | | |xclock | | ---- | | | | | | root window | |--------------------| CONCLUSION: Place the top left corner of the application 10 pixels away from the top left corner of the root window in both dimensions. Easy enough! 2) xclock -geometry -10-10 RESULT: ---------------------- | | | | | | | | | | | ---| | | | |-----------------|--| CONCLUSION: I expected that the bottom right corner of the application would be 10 pixels from the bottom right corner of the root window. Instead it is 0 pixels from the corner. So this led me to conclude that "-" implies bottom right corner of the root window but top-left corner of the application. Since the client would be off screen with this specification the window manager moved the client just enough so all would fit. 3) xclock -geometry -500-500 RESULT: ---------------------- | | | | | | | | | ------ | | | | | | | .| | | ------ | | | | | | | |--------------------| The dot in the xclock (near the lower right corner) shows where a point 500 pixels left and 500 pixels above the bottom right corner of the root window would be. CONCLUSION: Since the point specified (-500,-500) is approximately in the lower right corner of the client it leads me to conclude that the spec references approximately the lower right corner of the client. -------------------------------------------------------------------------- So what is the proper model? Please call me at telnet-229-3029 or email me directly at tonyw@hpfccg.sde.hp.com if you have an explanation. Tony Walker
joe@bwdlh111.BNR.CA (Joe Waddington) (11/25/90)
Hi, I have noticed a similar problem, after moving from uwm (flame shields up) to mwm. Uwm was free of decoration. I suspect (underscore that word) that the client attempts to locate itself at the right geometry. However, the window-manager then places decoration all around the window. and repositions the window.............or not Just an ide .. I have learned to live with it !#&?@ joe ============================================================= Please remember that these opinions are mine, and mine alone. ( a fact I'm not always eager to admit. ;-) ) ============================================================= Joe Waddington joe@bnr.ca Bell Northern Research =============================================================
oj@SABER.COM (11/27/90)
I'm confused about the behavior of the -geometry command line option with Motif applications and mwm or vuewm. The format is: -geometry +-x+-y ... 1) xclock -geometry +10+10 2) xclock -geometry -10-10 3) xclock -geometry -500-500 In my experience, xclock is a really lousy "subject" if you're trying to sort out the meaning of the -geometry option by "psychological experiments" like the ones you mention. I'd try a Motif-based application program instead. However, I think your experimental results are correct in this case, anyhow. The meaning of +10 is, ideally, "leave a gap of ten pixels between the left/top edge of the bottle--the physical screen--and the window. Likewise the meaning of -10 is "leave a gap of ten pixels between the right/bottom edge of the bottle and the window." The ambiguity arises when a window manager adds a decoration window and reparents the application window. The decoration effectively makes the window appear bigger. Let's consider an example where the app. window is 30x30, by default. Also, let's assume the screen is 1280x1024, and we specify "-geometry -10-10" Information of the form -10-10 is unavailable to the window manager, so it can't tell whether you actually specified +1250+994 (for example) or -10-10 as the geometry. All it knows is that it has to decorate a window with x=1250 and y=994. Suppose you're adding decoration of six pixels' width all around (resize handles all around, no title or buttons). This means that your app. window origin gets moved to 1256,1000. It also means that the lower right corner of the decoration window (which is 42x42 in size, total, including the app. 30x30) ends up offscreen. Ollie Jones Saber Software, Inc.