aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsfns.m
diff options
context:
space:
mode:
authorJuri Linkov2019-09-25 00:50:58 +0300
committerJuri Linkov2019-09-25 00:50:58 +0300
commit8f268bb9bfbaee9f32e7179d56958ef30d66851f (patch)
tree955b990b39a86e209550c245a78160d56e79729f /src/nsfns.m
parent39255b9b4de0b036568b64d7170ba8076d96be1d (diff)
downloademacs-8f268bb9bfbaee9f32e7179d56958ef30d66851f.tar.gz
emacs-8f268bb9bfbaee9f32e7179d56958ef30d66851f.zip
Revert an attempt to implement a non‐native tab bar on NS.
Diffstat (limited to 'src/nsfns.m')
-rw-r--r--src/nsfns.m55
1 files changed, 3 insertions, 52 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index 308586ef5a8..184fd71678e 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -614,43 +614,8 @@ ns_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
614static void 614static void
615ns_set_tab_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) 615ns_set_tab_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
616{ 616{
617 /* Currently, when the tab bar changes state, the frame is resized. 617 /* Currently unimplemented. */
618
619 TODO: It would be better if this didn't occur when 1) the frame
620 is full height or maximized or 2) when specified by
621 `frame-inhibit-implied-resize'. */
622 int nlines;
623
624 NSTRACE ("ns_set_tab_bar_lines"); 618 NSTRACE ("ns_set_tab_bar_lines");
625
626 if (FRAME_MINIBUF_ONLY_P (f))
627 return;
628
629 if (RANGED_FIXNUMP (0, value, INT_MAX))
630 nlines = XFIXNAT (value);
631 else
632 nlines = 0;
633
634 if (nlines)
635 update_frame_tab_bar (f);
636
637 {
638 int inhibit
639 = ((f->after_make_frame
640 && !f->tab_bar_resized
641 && (EQ (frame_inhibit_implied_resize, Qt)
642 || (CONSP (frame_inhibit_implied_resize)
643 && !NILP (Fmemq (Qtab_bar_lines,
644 frame_inhibit_implied_resize))))
645 && NILP (get_frame_param (f, Qfullscreen)))
646 ? 0
647 : 2);
648
649 NSTRACE_MSG ("inhibit:%d", inhibit);
650
651 frame_size_history_add (f, Qupdate_frame_tab_bar, 0, 0, Qnil);
652 adjust_frame_size (f, -1, -1, inhibit, 0, Qtab_bar_lines);
653 }
654} 619}
655 620
656 621
@@ -1331,10 +1296,6 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
1331 NILP (Vmenu_bar_mode) 1296 NILP (Vmenu_bar_mode)
1332 ? make_fixnum (0) : make_fixnum (1), 1297 ? make_fixnum (0) : make_fixnum (1),
1333 NULL, NULL, RES_TYPE_NUMBER); 1298 NULL, NULL, RES_TYPE_NUMBER);
1334 gui_default_parameter (f, parms, Qtab_bar_lines,
1335 NILP (Vtab_bar_mode)
1336 ? make_fixnum (0) : make_fixnum (1),
1337 NULL, NULL, RES_TYPE_NUMBER);
1338 gui_default_parameter (f, parms, Qtool_bar_lines, 1299 gui_default_parameter (f, parms, Qtool_bar_lines,
1339 NILP (Vtool_bar_mode) 1300 NILP (Vtool_bar_mode)
1340 ? make_fixnum (0) : make_fixnum (1), 1301 ? make_fixnum (0) : make_fixnum (1),
@@ -1346,7 +1307,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
1346 RES_TYPE_STRING); 1307 RES_TYPE_STRING);
1347 1308
1348 parms = get_geometry_from_preferences (dpyinfo, parms); 1309 parms = get_geometry_from_preferences (dpyinfo, parms);
1349 window_prompting = gui_figure_window_size (f, parms, true, true, 1310 window_prompting = gui_figure_window_size (f, parms, false, true,
1350 &x_width, &x_height); 1311 &x_width, &x_height);
1351 1312
1352 tem = gui_display_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, 1313 tem = gui_display_get_arg (dpyinfo, parms, Qunsplittable, 0, 0,
@@ -2839,10 +2800,6 @@ frame_geometry (Lisp_Object frame, Lisp_Object attribute)
2839 int native_right = f->left_pos + outer_width - border; 2800 int native_right = f->left_pos + outer_width - border;
2840 int native_bottom = f->top_pos + outer_height - border; 2801 int native_bottom = f->top_pos + outer_height - border;
2841 int internal_border_width = FRAME_INTERNAL_BORDER_WIDTH (f); 2802 int internal_border_width = FRAME_INTERNAL_BORDER_WIDTH (f);
2842 int tab_bar_height = FRAME_TABBAR_HEIGHT (f);
2843 int tab_bar_width = (tab_bar_height
2844 ? outer_width - 2 * internal_border_width
2845 : 0);
2846 int tool_bar_height = FRAME_TOOLBAR_HEIGHT (f); 2803 int tool_bar_height = FRAME_TOOLBAR_HEIGHT (f);
2847 int tool_bar_width = (tool_bar_height 2804 int tool_bar_width = (tool_bar_height
2848 ? outer_width - 2 * internal_border_width 2805 ? outer_width - 2 * internal_border_width
@@ -2858,7 +2815,7 @@ frame_geometry (Lisp_Object frame, Lisp_Object attribute)
2858 native_right, native_bottom); 2815 native_right, native_bottom);
2859 else if (EQ (attribute, Qinner_edges)) 2816 else if (EQ (attribute, Qinner_edges))
2860 return list4i (native_left + internal_border_width, 2817 return list4i (native_left + internal_border_width,
2861 native_top + tab_bar_height + tool_bar_height + internal_border_width, 2818 native_top + tool_bar_height + internal_border_width,
2862 native_right - internal_border_width, 2819 native_right - internal_border_width,
2863 native_bottom - internal_border_width); 2820 native_bottom - internal_border_width);
2864 else 2821 else
@@ -2877,9 +2834,6 @@ frame_geometry (Lisp_Object frame, Lisp_Object attribute)
2877 Fcons (make_fixnum (0), make_fixnum (title_height))), 2834 Fcons (make_fixnum (0), make_fixnum (title_height))),
2878 Fcons (Qmenu_bar_external, Qnil), 2835 Fcons (Qmenu_bar_external, Qnil),
2879 Fcons (Qmenu_bar_size, Fcons (make_fixnum (0), make_fixnum (0))), 2836 Fcons (Qmenu_bar_size, Fcons (make_fixnum (0), make_fixnum (0))),
2880 Fcons (Qtab_bar_size,
2881 Fcons (make_fixnum (tab_bar_width),
2882 make_fixnum (tab_bar_height))),
2883 Fcons (Qtool_bar_external, 2837 Fcons (Qtool_bar_external,
2884 FRAME_EXTERNAL_TOOL_BAR (f) ? Qt : Qnil), 2838 FRAME_EXTERNAL_TOOL_BAR (f) ? Qt : Qnil),
2885 Fcons (Qtool_bar_position, FRAME_TOOL_BAR_POSITION (f)), 2839 Fcons (Qtool_bar_position, FRAME_TOOL_BAR_POSITION (f)),
@@ -2917,9 +2871,6 @@ and width values are in pixels.
2917`menu-bar-size' is a cons of the width and height of the menu bar of 2871`menu-bar-size' is a cons of the width and height of the menu bar of
2918 FRAME. 2872 FRAME.
2919 2873
2920`tab-bar-size' is a cons of the width and height of the tab bar of
2921 FRAME.
2922
2923`tool-bar-external', if non-nil, means the tool bar is external (never 2874`tool-bar-external', if non-nil, means the tool bar is external (never
2924 included in the inner edges of FRAME). 2875 included in the inner edges of FRAME).
2925 2876