mazer@asterix.asterix.cns.caltech.edu (Jamie Mazer) (03/15/91)
Sorry if these are silly questions, but they've been bugging me for a while... I've written about 17000 lines of a X-based appl, much of it, using along of X features, but I still haven't figured how to do these things: 1. It seems that the XtNx and XtNy values are cached in the widget structure and not always updated when the window is moved (this is for the toplevel window returned by XtInitialize). So, when I popup a dialog box in the center of the application window, determined using the XtNx and XtNy props, the box is always centered on where the window was first positioned, not where it is now. The same thing holds for XtTranslateCoords(). So, is this a bug in my toolkit (the R3 libs supplied with Ultrix 4.0 on a DECstation 50000/200)? or a feature? If the latter, what's the correct way to determine the current window position? (Note: I get the same effect on other R3 systems as well). 2. Can anyone point me to an R3 application that uses accelerators or perhaps some demo code? I'd like to be able to have the user be able to define keystrokes to simulate commandWidget presses, which seems to be the purpose of accelerators, no? I haven't been able to coerce the docs I have into working code to date. Replies to me, please. No bashing for still using R3 accepted! It's not my decision, it's gotta run on a platform where we only have R3 (masscomp/concurrent's RTU, to be exact). Thanks a lot, /Jamie -- / mazer@asterix.cns.caltech.edu \/ [Caltech] ... science steals your soul, \ \ JMazer@CALTECH.BITNET /\ don't come here unless you have to. /
asente@adobe.com (Paul Asente) (03/16/91)
In article <MAZER.91Mar14194357@asterix.asterix.cns.caltech.edu> mazer@asterix.asterix.cns.caltech.edu (Jamie Mazer) writes: >1. It seems that the XtNx and XtNy values are cached in the widget > structure and not always updated when the window is moved (this is > for the toplevel window returned by XtInitialize)... > > So, is this a bug in my toolkit (the R3 libs supplied with Ultrix 4.0 > on a DECstation 50000/200)? or a feature? If the latter, what's the > correct way to determine the current window position? (Note: I get > the same effect on other R3 systems as well). It's probably a bug in your wndow manager. Xt can't tell when your top-level window gets moved unless the window manager tells it of the new position. You can work around it by using XTranslateCoordinates. -paul asente asente@adobe.com ...decwrl!adobe!asente Ratz put a bucket of liquid in front of me. "I wanted a glass of docs, Ratz. What the hell is this?" I barked. "Motif don't fit in a glass anymore," he barked back. I looked at the liquid. It was totally opaque to me.