aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Innes2001-01-02 22:44:52 +0000
committerAndrew Innes2001-01-02 22:44:52 +0000
commitabf8c61b624d713f50912523d63deff2ad0ca6fb (patch)
tree45c9cab9c20ce9b9a3434bb3b102e703adc31c0e /src
parentf82f26babc41796f46e7877e9ff480aad49a339f (diff)
downloademacs-abf8c61b624d713f50912523d63deff2ad0ca6fb.tar.gz
emacs-abf8c61b624d713f50912523d63deff2ad0ca6fb.zip
(Fx_display_color_cells): Determine correct value, when
system doesn't tell us directly. (Fx_display_visual_class): Implement properly.
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 657d5dd6612..ab750acbac3 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -7215,6 +7215,9 @@ If omitted or nil, that stands for the selected frame's display.")
7215 cap = GetDeviceCaps (hdc,SIZEPALETTE); 7215 cap = GetDeviceCaps (hdc,SIZEPALETTE);
7216 else 7216 else
7217 cap = GetDeviceCaps (hdc,NUMCOLORS); 7217 cap = GetDeviceCaps (hdc,NUMCOLORS);
7218
7219 if (cap < 0)
7220 cap = 1 << (dpyinfo->n_planes * dpyinfo->n_cbits);
7218 7221
7219 ReleaseDC (dpyinfo->root_window, hdc); 7222 ReleaseDC (dpyinfo->root_window, hdc);
7220 7223
@@ -7342,22 +7345,18 @@ If omitted or nil, that stands for the selected frame's display.")
7342 Lisp_Object display; 7345 Lisp_Object display;
7343{ 7346{
7344 struct w32_display_info *dpyinfo = check_x_display_info (display); 7347 struct w32_display_info *dpyinfo = check_x_display_info (display);
7348 Lisp_Object result = Qnil;
7345 7349
7346#if 0 7350 if (dpyinfo->has_palette)
7347 switch (dpyinfo->visual->class) 7351 result = intern ("pseudo-color");
7348 { 7352 else if (dpyinfo->n_planes * dpyinfo->n_cbits == 1)
7349 case StaticGray: return (intern ("static-gray")); 7353 result = intern ("static-grey");
7350 case GrayScale: return (intern ("gray-scale")); 7354 else if (dpyinfo->n_planes * dpyinfo->n_cbits == 4)
7351 case StaticColor: return (intern ("static-color")); 7355 result = intern ("static-color");
7352 case PseudoColor: return (intern ("pseudo-color")); 7356 else if (dpyinfo->n_planes * dpyinfo->n_cbits > 8)
7353 case TrueColor: return (intern ("true-color")); 7357 result = intern ("true-color");
7354 case DirectColor: return (intern ("direct-color"));
7355 default:
7356 error ("Display has an unknown visual class");
7357 }
7358#endif
7359 7358
7360 error ("Display has an unknown visual class"); 7359 return result;
7361} 7360}
7362 7361
7363DEFUN ("x-display-save-under", Fx_display_save_under, 7362DEFUN ("x-display-save-under", Fx_display_save_under,