Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!decuac!bacchus.pa.dec.com!decwrl!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.windows.x Subject: Re: Novice needs help Message-ID: <1990Aug28.173523.4282@wrl.dec.com> Date: 28 Aug 90 17:35:23 GMT References: <1990Aug25.215821.25317@murdoch.acc.Virginia.EDU> Sender: news@wrl.dec.com (News) Reply-To: klee@wsl.dec.com Organization: DEC Western Software Laboratory Lines: 34 In article <1990Aug25.215821.25317@murdoch.acc.Virginia.EDU>, gsh7w@astsun9.astro.Virginia.EDU (Greg S. Hennessy) writes: |> X Error of failed request: BadMatch (invalid parameter attributes) |> Major opcode of failed request: 42 (X_SetInputFocus) |> Minor opcode of failed request: 0 |> Resource id in failed request: 0xe00002 |> Serial number of failed request: 59 |> Current serial number in output stream: 60 |> |> I have the source, but I am a novice with X-windows. Can anyone give |> me some advice as to what may be going wrong? Or at least a hint to |> which FM I should read? The simplest way to debug an X protocol error like this is to: 1. look in the appendix of the Xlib manual to see which Xlib functions generate this protocol request 2. read the description of those functions in the Xlib manual In this case, only XSetInputFocus generates the SetInputFocus request. The Xlib manual says that a BadMatch error happens if the window ID in the XSetInputFocus call is not viewable. If you want to get fancier about error handling, see the chapter in the Xlib manual on errors. You may want to include an error handler in your program or debug it by enabling synchronization. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee