diff options
| author | Robert Pluim | 2019-12-29 20:34:20 +0100 |
|---|---|---|
| committer | Robert Pluim | 2019-12-29 21:15:33 +0100 |
| commit | 9ce4207969f61476a78ba9fc3cb1fecdc3702013 (patch) | |
| tree | 26bb3a392534c3441146b3e11a0b174c136be421 /src | |
| parent | 732dcfc85078dafb4b5983de3cadb7a65329dc47 (diff) | |
| download | emacs-9ce4207969f61476a78ba9fc3cb1fecdc3702013.tar.gz emacs-9ce4207969f61476a78ba9fc3cb1fecdc3702013.zip | |
Revert "Check for GUI frame in ns_color_index_to_rgba"
This reverts commit ea84a95bd8d43612b4a424fb93de25a68ac31d05.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index 9e036aa1608..fbec816cccd 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -2290,24 +2290,19 @@ ns_lisp_to_color (Lisp_Object color, NSColor **col) | |||
| 2290 | 2290 | ||
| 2291 | /* Convert an index into the color table into an RGBA value. Used in | 2291 | /* Convert an index into the color table into an RGBA value. Used in |
| 2292 | xdisp.c:extend_face_to_end_of_line when comparing faces and frame | 2292 | xdisp.c:extend_face_to_end_of_line when comparing faces and frame |
| 2293 | color values. No-op on non-gui frames. */ | 2293 | color values. */ |
| 2294 | 2294 | ||
| 2295 | unsigned long | 2295 | unsigned long |
| 2296 | ns_color_index_to_rgba(int idx, struct frame *f) | 2296 | ns_color_index_to_rgba(int idx, struct frame *f) |
| 2297 | { | 2297 | { |
| 2298 | if (FRAME_DISPLAY_INFO (f)) | 2298 | NSColor *col; |
| 2299 | { | 2299 | col = ns_lookup_indexed_color (idx, f); |
| 2300 | NSColor *col; | ||
| 2301 | col = ns_lookup_indexed_color (idx, f); | ||
| 2302 | 2300 | ||
| 2303 | EmacsCGFloat r, g, b, a; | 2301 | EmacsCGFloat r, g, b, a; |
| 2304 | [col getRed: &r green: &g blue: &b alpha: &a]; | 2302 | [col getRed: &r green: &g blue: &b alpha: &a]; |
| 2305 | 2303 | ||
| 2306 | return ARGB_TO_ULONG((int)(a*255), | 2304 | return ARGB_TO_ULONG((int)(a*255), |
| 2307 | (int)(r*255), (int)(g*255), (int)(b*255)); | 2305 | (int)(r*255), (int)(g*255), (int)(b*255)); |
| 2308 | } | ||
| 2309 | else | ||
| 2310 | return idx; | ||
| 2311 | } | 2306 | } |
| 2312 | 2307 | ||
| 2313 | void | 2308 | void |