From a365251d01f553a329b6ade5b8a9dd93099caf41 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 3 Sep 2019 22:55:13 +0300 Subject: 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. --- lisp/xt-mouse.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lisp/xt-mouse.el') 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) -- cgit v1.2.1 From 7970c89c770f475ab67a8de84223e45c5bb23d8c Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 4 Sep 2019 22:05:05 +0300 Subject: Text-based nox builds compiled without X window support --- lisp/xt-mouse.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/xt-mouse.el') diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 5464da25009..ffc4e5de0cf 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -257,7 +257,7 @@ which is the \"1006\" extension implemented in Xterm >= 277." (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))) + (eq y 1))) 'tab-bar 'menu-bar)) (nthcdr 2 (posn-at-x-y x y))))) -- cgit v1.2.1