summaryrefslogtreecommitdiff
path: root/src/xfaces.c
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2017-04-12 18:22:44 +0200
committerMartin Rudalics <rudalics@gmx.at>2017-04-12 18:22:44 +0200
commitc25005eda1c5ad8dabb3ce815658bd3c637ae686 (patch)
treed4c7e6bd2d2a9fe8cdc3345a0f84d6d0aa6d4987 /src/xfaces.c
parent8720f601e715e5f1d41f7cf863a525a1cc1bc12c (diff)
downloademacs-c25005eda1c5ad8dabb3ce815658bd3c637ae686.tar.gz
New internal-border face and args for select-window and x-focus-frame
Add `internal-border' face and handle it whenever clearing the internal border. If NORECORD equals the symbol 'mark-for-redisplay', `select-window' will not record the window but still mark it for redisplay. The new argument NOACTIVATE for `x-focus-frame' tries to not activate FRAME when set. * lisp/faces.el (internal-border): New face. * lisp/mwheel.el (mwheel-scroll): Select window to scroll with `mark-for-redisplay'. * lisp/scroll-bar.el (scroll-bar-drag) (scroll-bar-horizontal-drag, scroll-bar-scroll-down) (scroll-bar-scroll-up, scroll-bar-toolkit-scroll) (scroll-bar-toolkit-horizontal-scroll): Select window to scroll with `mark-for-redisplay'. * lisp/window.el (handle-select-window): When `focus-follows-mouse' is not 'auto-raise' try to not activate FRAME. * src/dispextern.h (face_id): Add INTERNAL_BORDER_FACE_ID. * src/frame.c (Fx_focus_frame): New argument NOACTIVATE. * src/frame.h (x_focus_frame): Update extern declaration. * src/gtkutil.c (xg_clear_under_internal_border): Remove function. (xg_frame_resized, xg_frame_set_char_size): Call x_clear_under_internal_border. (xg_tool_bar_callback): Adapt x_focus_frame call. * src/gtkutil.h (xg_clear_under_internal_border): Remove declaration. * src/nsfns.m (x_focus_frame): Add argument NOACTIVATE. * src/w32fns.c (x_clear_under_internal_border): Fill border with internal-border background if specified. * src/w32term.h (x_clear_under_internal_border): Add extern declaration. * src/w32term.c (x_after_update_window_line): Fill border with internal-border background if specified. (w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar) (x_scroll_bar_clear, w32_read_socket): Call x_clear_under_internal_border. (x_focus_frame): New argument NOACTIVATE. * src/window.c (select_window): Mark WINDOW for redisplay when NORECORD equals 'mark-for-redisplay'. (Fselect_window): Update doc-string. (syms_of_window): Define Qmark_for_redisplay. * src/xdisp.c (clear_garbaged_frames, echo_area_display) (redisplay_internal): Call x_clear_under_internal_border. * src/xfaces.c (lookup_basic_face): Handle `window-divider' and `internal-border' faces. (realize_basic_faces): Realize `internal-border' face. (syms_of_xfaces): Define Qinternal_border. * src/xfns.c (x_set_internal_border_width): Remove call for xg_clear_under_internal_border. (x_focus_frame): New argument NOACTIVATE. When non-nil try to not activate frame. * src/xterm.c (x_fill_rectangle): No more static. (x_clear_under_internal_border, x_after_update_window_line): Fill border with internal-border background if specified. (xt_horizontal_action_hook): Rewrite. (handle_one_xevent): Call x_clear_under_internal_border. * src/xterm.h (x_fill_rectangle): Add extern declaration.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r--src/xfaces.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 7fcaef4e41a..4714b7b3cb8 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -4474,6 +4474,10 @@ lookup_basic_face (struct frame *f, int face_id)
case CURSOR_FACE_ID: name = Qcursor; break;
case MOUSE_FACE_ID: name = Qmouse; break;
case MENU_FACE_ID: name = Qmenu; break;
+ case WINDOW_DIVIDER_FACE_ID: name = Qwindow_divider; break;
+ case WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID: name = Qwindow_divider_first_pixel; break;
+ case WINDOW_DIVIDER_LAST_PIXEL_FACE_ID: name = Qwindow_divider_last_pixel; break;
+ case INTERNAL_BORDER_FACE_ID: name = Qinternal_border; break;
default:
emacs_abort (); /* the caller is supposed to pass us a basic face id */
@@ -5168,6 +5172,7 @@ realize_basic_faces (struct frame *f)
WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID);
realize_named_face (f, Qwindow_divider_last_pixel,
WINDOW_DIVIDER_LAST_PIXEL_FACE_ID);
+ realize_named_face (f, Qinternal_border, INTERNAL_BORDER_FACE_ID);
/* Reflect changes in the `menu' face in menu bars. */
if (FRAME_FACE_CACHE (f)->menu_face_changed_p)
@@ -6420,11 +6425,12 @@ syms_of_xfaces (void)
DEFSYM (Qmouse, "mouse");
DEFSYM (Qmode_line_inactive, "mode-line-inactive");
DEFSYM (Qvertical_border, "vertical-border");
-
- /* TTY color-related functions (defined in tty-colors.el). */
DEFSYM (Qwindow_divider, "window-divider");
DEFSYM (Qwindow_divider_first_pixel, "window-divider-first-pixel");
DEFSYM (Qwindow_divider_last_pixel, "window-divider-last-pixel");
+ DEFSYM (Qinternal_border, "internal-border");
+
+ /* TTY color-related functions (defined in tty-colors.el). */
DEFSYM (Qtty_color_desc, "tty-color-desc");
DEFSYM (Qtty_color_standard_values, "tty-color-standard-values");
DEFSYM (Qtty_color_by_index, "tty-color-by-index");