[linux] Help please:X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 1 (X_CreateWindow) Resource id in failed request: 0x0
peter Fodrek
fodrek na kasr.elf.stuba.sk
Středa Říjen 9 16:36:26 CEST 2002
Vazeny experti!
Viem mi niekto povedat, co znamena hlaska
"
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 1 (X_CreateWindow)
Resource id in failed request: 0x0
Serial number of failed request: 170
Current serial number in output stream: 401
"
pocas volania
XtRealizeWidget(hlavne);
initrezacia() and initplan()?
V tychto funciach sa vola len XtCreateManagedWidget, XtRealizeWidget
and exitable version funkcie XtMainLoop,ktora je vidiet aj v kode kode....
Prva obrazovka funguje v poriadku ale druha uz zlyhava a dabva tuto hlasku...
Na Web-e neviem najst nic a ani google nepomohol...
S vdakou za odpoved
CODE
Arg atributy
={{"label",(XtArgVal)"1"},{XtNbaseWidth,(XtArgVal)1024},{XtNbaseHeight,(XtAr
gVal)1024});
XtAppContext appcont;
XtAppContext *appcontPTR;
main()
{
....
appcontPTR=(XtAppContext * )malloc((sizeof(appcont)));
....
hlavne=XtAppInitialize
(&appcont,"HLAVNE",(XrmOptionDescRec*)NULL,ZERO,&argc,argv,(String*)NULL,atr
ibuty,XtNumber(atributy));
...
XtRealizeWidget(hlavne);
initinicializacna()
...
....
do
{
while(XtAppPending(appcont)!=0)
{
if(XtAppPending(appcont)!=0)
{
XtAppNextEvent(appcont,&event);
XtDispatchEvent(&event);
}
}
file://setpriority(PRIO_PROCESS,getpid(),-20);
file://setpriority(PRIO_PROCESS,getpid(),19);
file://printf("Idem zrusit\n");
{
XtUnrealizeWidget(hlavne);
printf("XtAppPending after
unrealize:%ld\n",(long)XtAppPending(appcont));
while((XtAppPending(appcont)!=0)||(XtIsRealized(hlavne)==TRUE))
{
if(XtAppPending(appcont)!=0)
{
XtAppNextEvent(appcont,&event);
XtDispatchEvent(&event);
// usleep(200000);
}
}
XtDestroyWidget(hlavne);
while((XtAppPending(appcont)!=0))
{
if(XtAppPending(appcont)!=0)
{
XtAppNextEvent(appcont,&event);
XtDispatchEvent(&event);
}
}
XtDestroyApplicationContext(appcont);
...
appcontPTR=(XtAppContext * )realloc((void
*)appcontPTR,(size_t)((padnuty+1)*sizeof(appcont)));
hlavne=XtAppInitialize(&(appcontPTR[padnuty]),meno,NULL,ZERO,&argc,argv,(Str
ing*)NULL,atributy,XtNumber(atributy));
....
// Call of full screen window which is needed in current time; posible use
of swith case in the future
if(OBRAZOVKA==1)
{
file://printf("Starting plan\n");
initplan();
// return when need to swith to to another screen
}else
{
if(OBRAZOVKA==2)
{
file://printf("Starting rezacia\n");
initrezacia();
// return when need to swith to to another screen
}
}
appcont=appcontPTR[padnuty];
}while(end==0);
}
------------- další část ---------------
HTML příloha byla odstraněna...
URL: http://lists.linux.sk/pipermail/linux/attachments/20021009/693a1bb7/attachment.html
Další informace o konferenci linux