Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5ff67d81
Commit
5ff67d81
authored
Mar 05, 2000
by
Gerd Moellmann
Browse files
(x_term_init): Create a colormap if not using the
default visual.
parent
28ee91c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
src/xterm.c
src/xterm.c
+18
-14
No files found.
src/xterm.c
View file @
5ff67d81
...
@@ -12988,8 +12988,7 @@ x_term_init (display_name, xrm_option, resource_name)
...
@@ -12988,8 +12988,7 @@ x_term_init (display_name, xrm_option, resource_name)
dpyinfo->screen = ScreenOfDisplay (dpyinfo->display,
dpyinfo->screen = ScreenOfDisplay (dpyinfo->display,
DefaultScreen (dpyinfo->display));
DefaultScreen (dpyinfo->display));
dpyinfo->visual = select_visual (dpyinfo->display, dpyinfo->screen,
select_visual (dpyinfo);
&dpyinfo->n_planes);
dpyinfo->cmap = DefaultColormapOfScreen (dpyinfo->screen);
dpyinfo->cmap = DefaultColormapOfScreen (dpyinfo->screen);
dpyinfo->height = HeightOfScreen (dpyinfo->screen);
dpyinfo->height = HeightOfScreen (dpyinfo->screen);
dpyinfo->width = WidthOfScreen (dpyinfo->screen);
dpyinfo->width = WidthOfScreen (dpyinfo->screen);
...
@@ -13018,8 +13017,9 @@ x_term_init (display_name, xrm_option, resource_name)
...
@@ -13018,8 +13017,9 @@ x_term_init (display_name, xrm_option, resource_name)
dpyinfo->image_cache = make_image_cache ();
dpyinfo->image_cache = make_image_cache ();
/* See if a private colormap is requested. */
/* See if a private colormap is requested. */
if (dpyinfo->visual == DefaultVisualOfScreen (dpyinfo->screen)
if (dpyinfo->visual == DefaultVisualOfScreen (dpyinfo->screen))
&& dpyinfo->visual->class == PseudoColor)
{
if (dpyinfo->visual->class == PseudoColor)
{
{
Lisp_Object value;
Lisp_Object value;
value = display_x_get_resource (dpyinfo,
value = display_x_get_resource (dpyinfo,
...
@@ -13031,6 +13031,10 @@ x_term_init (display_name, xrm_option, resource_name)
...
@@ -13031,6 +13031,10 @@ x_term_init (display_name, xrm_option, resource_name)
|| !strcmp (XSTRING (value)->data, "on")))
|| !strcmp (XSTRING (value)->data, "on")))
dpyinfo->cmap = XCopyColormapAndFree (dpyinfo->display, dpyinfo->cmap);
dpyinfo->cmap = XCopyColormapAndFree (dpyinfo->display, dpyinfo->cmap);
}
}
}
else
dpyinfo->cmap = XCreateColormap (dpyinfo->display, dpyinfo->root_window,
dpyinfo->visual, AllocNone);
{
{
int screen_number = XScreenNumberOfScreen (dpyinfo->screen);
int screen_number = XScreenNumberOfScreen (dpyinfo->screen);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment