mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-07 15:21:46 +00:00
Revert "Check for GUI frame in ns_color_index_to_rgba"
This reverts commit ea84a95bd8
.
This commit is contained in:
parent
732dcfc850
commit
9ce4207969
19
src/nsterm.m
19
src/nsterm.m
@ -2290,24 +2290,19 @@ so some key presses (TAB) are swallowed by the system. */
|
||||
|
||||
/* Convert an index into the color table into an RGBA value. Used in
|
||||
xdisp.c:extend_face_to_end_of_line when comparing faces and frame
|
||||
color values. No-op on non-gui frames. */
|
||||
color values. */
|
||||
|
||||
unsigned long
|
||||
ns_color_index_to_rgba(int idx, struct frame *f)
|
||||
{
|
||||
if (FRAME_DISPLAY_INFO (f))
|
||||
{
|
||||
NSColor *col;
|
||||
col = ns_lookup_indexed_color (idx, f);
|
||||
NSColor *col;
|
||||
col = ns_lookup_indexed_color (idx, f);
|
||||
|
||||
EmacsCGFloat r, g, b, a;
|
||||
[col getRed: &r green: &g blue: &b alpha: &a];
|
||||
EmacsCGFloat r, g, b, a;
|
||||
[col getRed: &r green: &g blue: &b alpha: &a];
|
||||
|
||||
return ARGB_TO_ULONG((int)(a*255),
|
||||
(int)(r*255), (int)(g*255), (int)(b*255));
|
||||
}
|
||||
else
|
||||
return idx;
|
||||
return ARGB_TO_ULONG((int)(a*255),
|
||||
(int)(r*255), (int)(g*255), (int)(b*255));
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user