731 |
TrueColorVisual = True; |
TrueColorVisual = True; |
732 |
} |
} |
733 |
|
|
734 |
if ((g_server_bpp == 8) && ((! TrueColorVisual) || (g_depth <= 8))) |
if ((g_server_bpp == 8) && ((!TrueColorVisual) || (g_depth <= 8))) |
735 |
{ |
{ |
736 |
/* we use a colourmap, so the default visual should do */ |
/* we use a colourmap, so the default visual should do */ |
737 |
g_visual = DefaultVisualOfScreen(g_screen); |
g_visual = DefaultVisualOfScreen(g_screen); |
783 |
|
|
784 |
if (!g_owncolmap) |
if (!g_owncolmap) |
785 |
{ |
{ |
786 |
g_xcolmap = XCreateColormap(g_display,RootWindowOfScreen(g_screen),g_visual,AllocNone); |
g_xcolmap = |
787 |
|
XCreateColormap(g_display, RootWindowOfScreen(g_screen), g_visual, |
788 |
|
AllocNone); |
789 |
if (g_depth <= 8) |
if (g_depth <= 8) |
790 |
warning("Screen depth is 8 bits or lower: you may want to use -C for a private colourmap\n"); |
warning("Screen depth is 8 bits or lower: you may want to use -C for a private colourmap\n"); |
791 |
} |
} |
851 |
{ |
{ |
852 |
if (g_IM != NULL) |
if (g_IM != NULL) |
853 |
XCloseIM(g_IM); |
XCloseIM(g_IM); |
854 |
|
|
855 |
if (g_null_cursor != NULL) |
if (g_null_cursor != NULL) |
856 |
ui_destroy_cursor(g_null_cursor); |
ui_destroy_cursor(g_null_cursor); |
857 |
|
|
896 |
|
|
897 |
if ((g_ownbackstore) && (g_backstore == NULL)) |
if ((g_ownbackstore) && (g_backstore == NULL)) |
898 |
{ |
{ |
899 |
g_backstore = |
g_backstore = XCreatePixmap(g_display, g_wnd, g_width, g_height, g_depth); |
|
XCreatePixmap(g_display, g_wnd, g_width, g_height, |
|
|
g_depth); |
|
900 |
|
|
901 |
/* clear to prevent rubbish being exposed at startup */ |
/* clear to prevent rubbish being exposed at startup */ |
902 |
XSetForeground(g_display, g_gc, BlackPixelOfScreen(g_screen)); |
XSetForeground(g_display, g_gc, BlackPixelOfScreen(g_screen)); |