Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tut.cis.ohio-state.edu!sppy00!jxf From: jxf@sppy00.UUCP (Jonathan Fausey) Newsgroups: comp.windows.x Subject: X Protocol Error? Keywords: BackgroundPixmap, XChangeWindowAttributes Message-ID: <1050@sppy00.UUCP> Date: 12 Dec 90 18:57:40 GMT Organization: Online Computer Library Center, Dublin, Ohio. Lines: 56 I have encountered an Xlib programming problem that I am unable to resolve. Namely, the code below compiles on a Sparcstation 1 (R3), a NeXT (R3), a Mac IIx (A/UX & R4), a DG AViiON (R3), and a Sun 3/50 (R3), runs (as a client on any of these machines) under the X servers on the NeXT, Mac, and Sun 3/50, but generates an X protocol error on the others' X servers as well as on a PC X server. The X protocol error I get is: X Protocol error: BadMatch, invalid parameter attributes Major opcode of failed request: 1 (X_CreateWindow) Minor opcode of failed request: 1 Resource id in failed request: 0x8006c Serial number of failed request: 82 Current serial number in output stream: 85 Here's (portions of) the code: Display *wndw_disp; int wndw_screen; Visual *visual; XSetWindowAttributes WinAttr; unsigned long WinAttrMask = CWBackPixmap; Window win; Window wndw_hndl; Pixmap pix; . . . if (!(wndw_disp = XOpenDisplay(""))) { printf("Can't connect to X server %s\n", XDisplayName("")); exit(-1); } wndw_screen = DefaultScreen(wndw_disp); wndw_hndl = XCreateSimpleWindow(wndw_disp, DefaultRootWindow(wndw_disp), wndw_hint.x, wndw_hint.y, wndw_hint.width, wndw_hint.height, border_w, wndw_foregrnd, wndw_backgrnd); XSetStandardProperties(wndw_disp, *wndw_hndl, test_str, cur_title_str, None, argv, argc, &wndw_hint); . . . pix = XCreateBitmapFromData(wndw_disp, wndw_hndl, RawBitmapData, NumBitsPerBitmapLine, NumLinesInBitmap); WinAttr.background_pixmap = pix; win = XCreateWindow(wndw_disp, DefaultRootWindow(wndw_disp), ulx, uly, width, height, 4, 1, InputOutput, DefaultVisual(wndw_disp,wndw_screen), WinAttrMask, &WinAttr); I get a similar X protocol error message when I use XCreateSimpleWindow and XSetBackgroundPixmap instead of XCreateWindow etc. Can some kind soul help?