Dear Intrinsics/Xfree86 Experts,
Can anyone help me to solve problem diagnosed as " 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 " when called XtRealizeWidget(hlavne); initrezacia() and initplan(),please? In these functions are only calls of XtCreateManagedWidget, XtRealizeWidget and exitable version of XtMainLoop as shown in Code.... First creen works well, but second can not been displayed becose of listed error... Can anyone help me,please? Thank you for your help Yours faitfully Peter Fodrek 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); } |