-
- /* Note: we can't use the resource ".visual" because Xt is SO FUCKED. */
- ssi->default_visual =
- get_visual_resource (ssi->screen, "visualID", "VisualID", False);
-
- ssi->current_visual = ssi->default_visual;
- ssi->current_depth = visual_depth (ssi->screen, ssi->current_visual);
-
- /* Execute a subprocess to find the GL visual. */
- ssi->best_gl_visual = get_best_gl_visual (ssi);
-
- if (ssi == si->default_screen)
- /* Since this is the default screen, use the one already created. */
- ssi->toplevel_shell = toplevel_shell;
- else
- /* Otherwise, each screen must have its own unmapped root widget. */
- ssi->toplevel_shell =
- XtVaAppCreateShell (progname, progclass, applicationShellWidgetClass,
- si->dpy,
- XtNscreen, ssi->screen,
- XtNvisual, ssi->current_visual,
- XtNdepth, visual_depth (ssi->screen,
- ssi->current_visual),
- NULL);
-
- if (! found_any_writable_cells)
- {
- /* Check to see whether fading is ever possible -- if any of the
- screens on the display has a PseudoColor visual, then fading can
- work (on at least some screens.) If no screen has a PseudoColor
- visual, then don't bother ever trying to fade, because it will
- just cause a delay without causing any visible effect.
- */
- if (has_writable_cells (ssi->screen, ssi->current_visual) ||
- get_visual (ssi->screen, "PseudoColor", True, False) ||
- get_visual (ssi->screen, "GrayScale", True, False))
- found_any_writable_cells = True;
- }