diff options
author | Juri Linkov <juri@linkov.net> | 2019-09-03 22:55:13 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2019-09-03 22:55:13 +0300 |
commit | a365251d01f553a329b6ade5b8a9dd93099caf41 (patch) | |
tree | 7bfad7f767f2871726df1a80122f467da159186d /lisp/xt-mouse.el | |
parent | c2ab5e8cf3654e3e13083fb2203502d5d5f49dc6 (diff) | |
download | emacs-a365251d01f553a329b6ade5b8a9dd93099caf41.tar.gz |
Text-mode display of the tab-bar and emulation of clicking on a tty.
* lisp/tab-bar.el (tab-bar-mouse): New command bound to mouse-1 on [tab-bar].
* lisp/xt-mouse.el (xterm-mouse-event): Use `tab-bar' when clicking
on the tab-bar that is on the second row below menu-bar.
* src/frame.c (set_tab_bar_lines): New function.
(frame_windows_min_size): Add FRAME_TAB_BAR_LINES.
(make_initial_frame): Call set_tab_bar_lines.
(store_frame_param): Call set_tab_bar_lines for Qtab_bar_lines prop.
(Fframe_parameters): Call store_in_alist for Qtab_bar_lines.
* src/xdisp.c (display_tab_bar): New function.
(redisplay_window): Call display_tab_bar when `FRAME_WINDOW_P (f)'
is NULL on a tty.
Diffstat (limited to 'lisp/xt-mouse.el')
-rw-r--r-- | lisp/xt-mouse.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index b53174b7bd5..5464da25009 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -253,7 +253,13 @@ which is the \"1006\" extension implemented in Xterm >= 277." (top (nth 1 ltrb)) (posn (if w (posn-at-x-y (- x left) (- y top) w t) - (append (list nil 'menu-bar) + (append (list nil (if (and tab-bar-mode + (or (not menu-bar-mode) + ;; The tab-bar is on the + ;; second row below menu-bar + (eq (cdr (nth 6 (posn-at-x-y x y))) 1))) + 'tab-bar + 'menu-bar)) (nthcdr 2 (posn-at-x-y x y))))) (event (list type posn))) (setcar (nthcdr 3 posn) timestamp) |