🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #24205

Re: Drawing graphics with the Athena Toolkit (QUESTION)

#24205
From: Tim Holt
Date: Fri, 28 Jun 1991 16:41
32 lines
1882 bytes
In article <1131@chiton.ucsd.edu> wayne@mpl%ucsd.edu (Wayne Crawford) writes:
	Stuff about bitmaps in labels and "window" for XCreatePixmap...
>X Error of failed request:  BadWindow (invalid Window parameter)
>  Major opcode of failed request:  1 (X_CreateWindow)
>  Minor opcode of failed request:  0
>  Resource id in failed request:  0x72610
>  Serial number of failed request:  46
>  Current serial number in output stream:  48

I had a similar problem, setting up a bitmap label from a "bitmap" (the program)
created bitmap data file.   I did something like this...

	Display *display;
	int screen;
	Widget label;
	Pixmap bitmap;
	Arg arg[1];
	int n;

	display = XtDisplay (partent_widget);
	screen = DefaultScreen (display);
	bitmap = XCreateBitmapFromData (display, RootWindow(display,screen),
			thebitmap_bits, thebitmap_width, thebitmap_height);
	n = 0;
	XtSetArg (arg[n], XtNbitmap, bitmap);	n++;
	label = XtCreateManagedWidget ("icon",
			labelWidgetClass, parent_widget,
			arg, n);
	
Did the trick for me, as far as that pesky error message was concerned...
Tim Holt / Marine Tech. / RV Wecoma (RV = Research Vessel, not Recreational
Vehicle!) / Oceanography / Oregon State University / holtt@rs6000.oce.orst.edu
Technical Details
Message-ID: <1991Jun28.164100.8285@talon.ucs.orst.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!spool.mu.edu!cs.umn.edu!talon!rs6000.oce.orst.edu!holtt
References: <1131@chiton.ucsd.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!spool.mu.edu!cs.umn.edu!talon!rs6000.oce.orst.edu!holtt
From: holtt@rs6000.oce.orst.edu (Tim Holt)
Newsgroups: comp.windows.x
Subject: Re: Drawing graphics with the Athena Toolkit (QUESTION)
Keywords: Athena, graphics
Message-ID: <1991Jun28.164100.8285@talon.ucs.orst.edu>
Date: 28 Jun 91 16:41:00 GMT
References: <1131@chiton.ucsd.edu>
Sender: usenet@talon.ucs.orst.edu (Usenet News admin)
Distribution: comp.windows.x
Organization: College of Oceanography Oregon State University
Lines: 32
Nntp-Posting-Host: rs6000.oce.orst.edu