pererik@KHEOPS.CMI.NO (Per-Erik Nordbo) (10/10/89)
I'm implementing a system where the windows position in the root window is of interrest. When I do a resize, I would like to know what corner(s) has been changed, since this affects the direction I would to display the underlying graphics. The Resize and Expose part of the XEvent structure doesn't give me the abolute position of the window on the screen. The only information I get is the <x,y> position relative to the window's parent window, which is owned by the window manager. XGetWindowGeoemtry() and that kind of procedures gives me the same form of RELATIVE window information. Is there a way to get the ABSOLUTE window position? Since I would like to get information about what direction to extend the drawings, the situation complicates if I have a sequence of RESIZE, MOVE, RESIZE. I can't find any specific EVENT MASK that will give me a Move Report. Is there any way out of this without installing window manager functions into the application? Per Erik Nordboe Chr. Michelsens Institute Norway
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (10/11/89)
Is there a way to get the ABSOLUTE window position? XTranslateCoordinates. Since I would like to get information about what direction to extend the drawings, the situation complicates if I have a sequence of RESIZE, MOVE, RESIZE. I don't understand. Your decision should be independent of what gestures the user might have made to resize the window.
karlton@sgi.com (Phil Karlton) (10/11/89)
Since I would like to get information about what direction to extend the drawings, the situation complicates if I have a sequence of RESIZE, MOVE, RESIZE. I don't understand. Your decision should be independent of what gestures the user might have made to resize the window. Unless a "photo cropping" type of user interface is desired. The user drags an edge (or corner) to uncover or obscure the adjacent part of the drawing. Using a BitGravity and WindowGravity of StaticGravity in a subwindow which is larger than its parent window (which may be considered a viewport onto the subwindow) may accomplish what you want. Phil Karlton karlton@sgi.com Silicon Graphics Computer Systems 415-335-1557 2011 N. Shoreline Blvd. P.O. Box 7311 Mountain View, CA 94039