home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / x / 15237 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  1.6 KB

  1. Xref: sparky comp.windows.x:15237 comp.windows.x.motif:5609
  2. Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!timkwan
  3. From: timkwan@athena.mit.edu (Unknown)
  4. Newsgroups: comp.windows.x,comp.windows.x.motif
  5. Subject: BadWindow result from XGetWindowAttributes
  6. Message-ID: <1992Aug14.062243.19523@athena.mit.edu>
  7. Date: 14 Aug 92 06:22:43 GMT
  8. Sender: news@athena.mit.edu (News system)
  9. Organization: Massachusetts Institute of Technology
  10. Lines: 30
  11. Nntp-Posting-Host: w20-575-73.mit.edu
  12.  
  13. I have:
  14.  
  15.   if ((w = XtNameToWidget(toplevel, args[0])) == NULL) {
  16.     scriptErr = SCRIPT_ERR_UNRECOGNIZED_WIDGET_NAME;
  17.     return 0;
  18.   }
  19.  
  20.   currWin = XtWindow(w);
  21.   XGetWindowAttributes(dpy, currWin, &attrib);
  22.  
  23. It bombed right at the XGetWindowAttributes() function with the
  24. following error message:
  25.  
  26. X Error of failed request:  BadWindow (invalid Window parameter) 
  27.   Major opcode of failed request:  3 (X_GetWindowAttributes) 
  28.   Resource id in failed request:  0x2 
  29.   Serial number of failed request:  1549 
  30.   Current serial number in output stream:  1549 
  31. Program exiting with return status = 1. 
  32.  
  33. In xsaber, I checked to make sure that XtName(w) was indeed the name
  34. of the widget in question.  The value of currWin was 0x2.  Why would
  35. XGetWindowAttributes fail with that value of currWin?  By the way, the
  36. value of args[0] was "mainWindow.menubar.button_1" which was one of
  37. the item widgets at the top of the motif menubar (verified by editres).
  38.  
  39. If you have any idea what may be causing this problem, please let me
  40. know by sending email to me directly.  Thanks.
  41.  
  42. -Tim
  43.