diff options
Diffstat (limited to 'src/xterm.c')
-rw-r--r-- | src/xterm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index 951f71cedda..2175835d6ab 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2354,6 +2354,14 @@ x_query_colors (struct frame *f, XColor *colors, int ncolors) XQueryColors (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), colors, ncolors); } +/* Store F's background color into *BGCOLOR. */ + +static void +x_query_frame_background_color (struct frame *f, XColor *bgcolor) +{ + bgcolor->pixel = FRAME_BACKGROUND_PIXEL (f); + x_query_colors (f, bgcolor, 1); +} /* On frame F, translate the color name to RGB values. Use cached information, if possible. @@ -13297,6 +13305,7 @@ x_create_terminal (struct x_display_info *dpyinfo) terminal->frame_up_to_date_hook = XTframe_up_to_date; terminal->buffer_flipping_unblocked_hook = XTbuffer_flipping_unblocked_hook; terminal->defined_color_hook = x_defined_color; + terminal->query_frame_background_color = x_query_frame_background_color; terminal->mouse_position_hook = XTmouse_position; terminal->get_focus_frame = x_get_focus_frame; terminal->focus_frame_hook = x_focus_frame; |