This is the mail archive of the xconq7@sourceware.cygnus.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Questions


Stan Shebs <shebs@cygnus.com> sez:

>    From: bob@fla.fujitsu.com (Bob Carragher)
>    Date: Thu, 03 Dec 1998 22:23:04 -0800
> 
>    2.  Independent, special-purpose windows, PLEASE!  That way, I can
>    independently size each window as needed or desired.
> 
> The Mac interface has lots of windows, and it generally wins (not
> always, screen can get cluttered).
> 
>    Also (but this
>    is another low priority item), if there's any way to specify different
>    displays for each of the windows, or at the very least the main
>    viewport window versus all the rest, then that would be a godsend.
>    Once again, braindead X, with its inability to consider multiple
>    monitors as one "virtual" monitor is the reason -- you have to
>    specify each as "foo:0.0," "foo:0.1," "foo:0.2," etc.
> 
> Hmmm, that sounds hard... I'll think about it, maybe it's not really
> that tough to do.

Conceptually, if you already have multiple windows (as opposed to
a single window, but with multiple subwindows), then it's relatively
easy, since you can just check the appropriate environment variable,
or however you want the user to specify it.  I would tend to take the
easy route, and assume everything goes into one window unless the
user explicitly tells me otherwise, and in a very particular way that
would make my job easy.  B-)  e.g.

     % setenv XCONQ_DISPLAY foo:0.0
     % setenv XCONQ_ALT_DISPLAY foo:0.1

     [and, in the code ...]
          /* Boy, I hope I'm not displaying my ignorance.  B-) */
          char primaryDisplayLoc[9999] = getenv("XCONQ_DISPLAY");
          char secondaryDisplayLoc[9999] = getenv("XCONQ_ALT_DISPLAY");

          /* WHAT ... is your main Display? */
          primaryDisplay = XOpenDisplay(primaryDisplayLoc);
          /* WHAT ... is your Root? */
          primaryRoot = RootWindow(primaryDisplay,
                                   DefaultScreen(primaryDisplay));
          /* And WHAT ... is your Window? */
          primaryWindow = XCreateSimpleWindow(primaryDisplay,
                                              primaryRoot,0,0,256,256,1,
                                              /* etc. etc. */);

          [...]

          /* WHAT ... is your alternate Display? */
          secondaryDisplay = XOpenDisplay(secondaryDisplayLoc);
          /* WHAT ... is its colormap? */
          secondaryCM = DefaultColormap(secondaryDisplay,
                                        DefaultScreen(secondaryDisplay));
          /* And WHAT ... is your favorite color? */
          favorite_color = 0;   /* Black. */

          /* Wait!  No, I mean: */
          favorite_color = BlackPixel(secondaryDisplay,
                                      DefaultScreen(secondaryDisplay));
          /* AAAAYYYEEEEEE!!  (Falls into chasm.) */

With apologies to the Unix-Haters, Monty Python, Stan Shebs, and
everyone else on this mailing list who actually read it all.  I
hope that it would have at least worked ....  ^_^;;;;

				Bob

P.S.  I just thought of something:  if this actually worked, one
could conceivably open up the main viewport on one machine, and
the control viewport(s) on another.  Why, I don't know, unless
one could then open up a "duplicate" copy of the main viewport
on multiple displays (for those who like to just watch -- good for
"XConq for Dummies" seminars B-).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]