aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorAlexander Gramiak2019-04-13 20:41:31 -0600
committerAlexander Gramiak2019-04-26 16:55:39 -0600
commit5d8b0fadeec373cd2861328aeb1cb4293cbc9ded (patch)
treec1db5270ae236a1437660b486e6c74fbee4733ff /src/xterm.c
parent41e20ee4bc01576d23fb8fd4f875385ce57eb36a (diff)
downloademacs-5d8b0fadeec373cd2861328aeb1cb4293cbc9ded.tar.gz
emacs-5d8b0fadeec373cd2861328aeb1cb4293cbc9ded.zip
Add terminal hook query_frame_background_color
* src/termhooks.c (query_frame_background_color): New terminal hook. * src/image.c (image_query_frame_background_color): Remove. Use the terminal hook instead. * src/nsterm.m: * src/w32term.c: * src/xterm.c: Implement and set the new terminal hook.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c
index d65ad98c4c6..c710d1c918b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2325,6 +2325,14 @@ x_query_colors (struct frame *f, XColor *colors, int ncolors)
2325 XQueryColors (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), colors, ncolors); 2325 XQueryColors (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), colors, ncolors);
2326} 2326}
2327 2327
2328/* Store F's background color into *BGCOLOR. */
2329
2330static void
2331x_query_frame_background_color (struct frame *f, XColor *bgcolor)
2332{
2333 bgcolor->pixel = FRAME_BACKGROUND_PIXEL (f);
2334 x_query_colors (f, bgcolor, 1);
2335}
2328 2336
2329/* On frame F, translate the color name to RGB values. Use cached 2337/* On frame F, translate the color name to RGB values. Use cached
2330 information, if possible. 2338 information, if possible.
@@ -13272,6 +13280,7 @@ x_create_terminal (struct x_display_info *dpyinfo)
13272 terminal->frame_up_to_date_hook = XTframe_up_to_date; 13280 terminal->frame_up_to_date_hook = XTframe_up_to_date;
13273 terminal->buffer_flipping_unblocked_hook = XTbuffer_flipping_unblocked_hook; 13281 terminal->buffer_flipping_unblocked_hook = XTbuffer_flipping_unblocked_hook;
13274 terminal->defined_color_hook = x_defined_color; 13282 terminal->defined_color_hook = x_defined_color;
13283 terminal->query_frame_background_color = x_query_frame_background_color;
13275 terminal->query_colors = x_query_colors; 13284 terminal->query_colors = x_query_colors;
13276 terminal->mouse_position_hook = XTmouse_position; 13285 terminal->mouse_position_hook = XTmouse_position;
13277 terminal->get_focus_frame = x_get_focus_frame; 13286 terminal->get_focus_frame = x_get_focus_frame;