X Error: Bad Window - Motif

This is a discussion on X Error: Bad Window - Motif ; I'm using Red Hat Linux, release 9, with Motif 2.2, on a KDE desktop. I downloaded Marshall Brain's Motif tutorial, compiled the first program, and got X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: X Error: Bad Window

  1. X Error: Bad Window

    I'm using Red Hat Linux, release 9, with Motif 2.2, on a KDE desktop. I
    downloaded Marshall Brain's Motif tutorial, compiled the first program, and
    got

    X Error of failed request: BadWindow (invalid Window parameter)
    Major opcode of failed request: 19 (X_DeleteProperty)
    Resource id in failed request: 0x0
    Serial number of failed request: 95
    Current serial number in output stream: 99

    when I ran it. I assume the program is OK (but I've included the source
    below, just in case), and that there's some sort of environmental setup I
    need to do before I run it, because Brain's compile instructions

    cc -o test2 test2.c -lX11 -lXt -lXm

    also didn't work until I added "-L/usr/X11R6/lib". I looked through the
    man pages of all the X calls to check for a parameter anomaly; it
    recommended using XtOpenApplication instead of XtInitialize, which I tried,
    but with the same result.

    What do I need to do to run Motif apps?

    Thanks,
    Bill

    #include
    #include
    main(int argc, char *argv[])
    {
    Widget toplevel, msg;
    Arg al[10];
    int ac;

    toplevel=XtInitialize(argv[0],"",NULL,0,&argc,argv);
    ac=0;
    XtSetArg(al[ac],XmNlabelString,
    XmStringCreate("hello",XmSTRING_DEFAULT_CHARSET)); ac++;
    msg=XtCreateManagedWidget("msg",xmLabelWidgetClass,toplevel,al,ac);
    XtRealizeWidget(toplevel);
    XtMainLoop();
    }




  2. Re: X Error: Bad Window

    "William Winkler" wrote in news:c2c0nc$83f
    $1@geraldo.cc.utexas.edu:
    > cc -o test2 test2.c -lX11 -lXt -lXm


    Try reversing the order of the libraries.

    Ken Lee, http://www.rahul.net/kenton/

+ Reply to Thread