home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x:15237 comp.windows.x.motif:5609
- Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!timkwan
- From: timkwan@athena.mit.edu (Unknown)
- Newsgroups: comp.windows.x,comp.windows.x.motif
- Subject: BadWindow result from XGetWindowAttributes
- Message-ID: <1992Aug14.062243.19523@athena.mit.edu>
- Date: 14 Aug 92 06:22:43 GMT
- Sender: news@athena.mit.edu (News system)
- Organization: Massachusetts Institute of Technology
- Lines: 30
- Nntp-Posting-Host: w20-575-73.mit.edu
-
- I have:
-
- if ((w = XtNameToWidget(toplevel, args[0])) == NULL) {
- scriptErr = SCRIPT_ERR_UNRECOGNIZED_WIDGET_NAME;
- return 0;
- }
-
- currWin = XtWindow(w);
- XGetWindowAttributes(dpy, currWin, &attrib);
-
- It bombed right at the XGetWindowAttributes() function with the
- following error message:
-
- X Error of failed request: BadWindow (invalid Window parameter)
- Major opcode of failed request: 3 (X_GetWindowAttributes)
- Resource id in failed request: 0x2
- Serial number of failed request: 1549
- Current serial number in output stream: 1549
- Program exiting with return status = 1.
-
- In xsaber, I checked to make sure that XtName(w) was indeed the name
- of the widget in question. The value of currWin was 0x2. Why would
- XGetWindowAttributes fail with that value of currWin? By the way, the
- value of args[0] was "mainWindow.menubar.button_1" which was one of
- the item widgets at the top of the motif menubar (verified by editres).
-
- If you have any idea what may be causing this problem, please let me
- know by sending email to me directly. Thanks.
-
- -Tim
-