Path: utzoo!attcan!uunet!samsung!sol.ctr.columbia.edu!src.honeywell.com!msi.umn.edu!sctc.com!pasturel From: pasturel@sctc.com (Pierre Pasturel) Newsgroups: comp.windows.x.motif Subject: bugs/problems in motif 1.0 Summary: bugs/problems/missing features in motif 1.0 Message-ID: <1990Nov6.161146.20690@sctc.com> Date: 6 Nov 90 16:11:46 GMT Distribution: comp.windows.x.motif Organization: Secure Computing Technology Corporation Lines: 77 Are the following bugs/problems/missing features in Motif 1.0??? 1. I create a bulletinboarddialog widget whose parent is a mainwindow widget. I animate the movement of this bulletinboard by by changing the XmNx,XmNy of its PARENT dialog shell to set the x,y coordinates (relative to the root window) of the WINDOW'S WORKING AREA. When I first login in for the day, start my x session and mwm, and execute my application program, the XmNx, XmNy coordinates occassionally (not always) set the x,y coord. of the (top left corner of the) WINDOW FRAME. I immediately re-execute my application again (no recompiles or anything), and then it works correctly (ie.. the window is placed for the x,y coord. of the window's working area). This inconsistency is annoying... 2. The XmNinsertionPointVisable is documented as a resource of a XmText widget but does not work when set. I could not find its string macro define in Xm.h. 3. I was trying to use the XtParent(), XtScreen(), XtDisplay() functions in my application program and I found that they always returned a 0. Turns out that my program was including Instrinsic.h followed by IntrinsicP.h. The latter include file re-defines the function prototypes defined in the former as macro defines. For example, Intrinsic.h defines: extern Screen *XtScreen( #if NeedFunctionPrototypes Widget /* widget */ #endif ); while IntrinsicP.h defines: #define XtScreen(widget) ((widget)->core.screen) I guess the widget core.screen field was set to 0. Actually, the reason why I ran into this mess was that I was using the xmfonts.c demo source code as a model which includes Instrinsic.h followed by IntrinsicP.h. When I tried running xmfonts, I found that it was giving me core dumps at the following line of code: font = XLoadQueryFont( XtDisplay( XtParent(parent)), name); The source code listed for xmfonts.c in the OSF/Motif 1.0 programmer's guide also shows the inclusion of those files in that order. This leads to my questions: when is one suppose to include Intrinisc.h followed by IntrinsicP.h? Why was the latter included in the xmfonts.c demo source if it results in core dumps? I'm sure that someone tried to see if this demo worked before shipping it. Documentation in Intrinsic.h and IntrinsicP.h is non-existent so the programmer has no idea what they are used for. 4. I've noticed that if you try to set the XmNvalue and XmNcursorPosition resources for the a text widget with the same XtSetValues call, then the XmNvalue gets updated corectly, but the cursor position SOMETIMES gets set to 0 despite setting it to a non-zero value. I think that it has something to do with the internal buffer that stores XmNvalue which must somehow be empty when motif tries to set the cursor position because it then thinks there are is no text and therefore the cursor position should be set at the 0th position. My "fix" is to make another XtSetValues call to again set the XmNcursorPosition resource to the desired non-zero value. BTW, is there a list of "commonly asked questions about programming in motif" somewhere so that people like us don't have to flood this newsgroup with our basic questions? Thanks Pierre Pasturel pasturel@sctc.com