Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!lakes.cray.COM!keith From: keith@lakes.cray.COM (Keith A. Fredericks) Newsgroups: comp.windows.x Subject: text widget on multiple displays? Message-ID: <8902231605.AA14224@mirror.cray.com> Date: 23 Feb 89 16:05:06 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 62 I am trying to realize text widgets on multiple displays. When I run my program, I get: X Protocol error: BadCursor, invalid Cursor parameter I can realize list, command, and label widgets with this method, but not text or dialog widgets. Is there a work-around or a fix or another method to get two text widgets on two displays controlled by the same application? Here is the program: ----------- /* program to put a text widget on two displays */ #include #include #include #include #include main(argc, argv) unsigned int argc; char **argv; { Display *dpy1, *dpy2; Widget toplevel1, toplevel2, text1, text2; XtToolkitInitialize(); dpy1 = XtOpenDisplay(NULL, "mirror:0.0", NULL, "test", NULL, 0, &argc, argv); if (dpy1 == NULL) { printf("XtOpenDisplay #1 failed\n"); return; } dpy2 = XtOpenDisplay(NULL, "nokomis:0.0", NULL, "test", NULL, 0, &argc, argv); if (dpy2 == NULL) { printf("XtOpenDisplay #2 failed\n"); return; } toplevel1 = XtAppCreateShell("XShell","xshell", applicationShellWidgetClass,dpy1,NULL,0); toplevel2 = XtAppCreateShell("XShell","xshell", applicationShellWidgetClass,dpy2,NULL,0); text1 = XtCreateManagedWidget( "text1", asciiStringWidgetClass, toplevel1, NULL, 0 ); text2 = XtCreateManagedWidget( "text2", asciiStringWidgetClass, toplevel2, NULL, 0 ); XtRealizeWidget(toplevel1); XtRealizeWidget(toplevel2); XtMainLoop(); } --------- BTW, this program works fine when the two display strings are the same. -keith