(when (eq (car-safe binding) 'menu-item)
(when (> (+ column (length (nth 1 binding))) x-position)
;; TODO: handle close
- (unless (get-text-property (- x-position column) 'close (nth 1 binding))
+ (unless (get-text-property (- x-position column) 'close-tab (nth 1 binding))
(call-interactively (nth 2 binding)))
(throw 'done t))
(setq column (+ column (length (nth 1 binding))))))
data-directory)
:margin (2 . 0)
:ascent center)
- 'close t
+ 'close-tab t
:help "Click to close tab")
"Button for closing the clicked tab.")
nlines = 0;
if (nlines)
- {
- FRAME_EXTERNAL_TAB_BAR (f) = 1;
- update_frame_tab_bar (f);
- }
- else
- {
- if (FRAME_EXTERNAL_TAB_BAR (f))
- {
- free_frame_tab_bar (f);
- FRAME_EXTERNAL_TAB_BAR (f) = 0;
-
- {
- EmacsView *view = FRAME_NS_VIEW (f);
- int fs_state = [view fullscreenState];
-
- if (fs_state == FULLSCREEN_MAXIMIZED)
- {
- [view setFSValue:FULLSCREEN_WIDTH];
- }
- else if (fs_state == FULLSCREEN_HEIGHT)
- {
- [view setFSValue:FULLSCREEN_NONE];
- }
- }
- }
- }
+ update_frame_tab_bar (f);
{
int inhibit
RES_TYPE_STRING);
parms = get_geometry_from_preferences (dpyinfo, parms);
- window_prompting = gui_figure_window_size (f, parms, true,
+ window_prompting = gui_figure_window_size (f, parms, true, true,
&x_width, &x_height);
tem = gui_display_get_arg (dpyinfo, parms, Qunsplittable, 0, 0,
if ([view isFullscreen] && [view fsIsNative])
{
// Fix reappearing tool bar or tab bar in fullscreen for Mac OS X 10.7
- BOOL tarbar_visible = FRAME_EXTERNAL_TAB_BAR (f) ? YES : NO;
+ BOOL tarbar_visible = NO;
NSToolbar *tabbar = [FRAME_NS_VIEW (f) tabbar];
if (! tarbar_visible != ! [tabbar isVisible])
[tabbar setVisible: tarbar_visible];
/* Don't set frame garbaged until tab bar is up to date?
This avoids an extra clear and redraw (flicker) at frame creation. */
- if (FRAME_EXTERNAL_TAB_BAR (f)) wait_for_tab_bar = YES;
- else wait_for_tab_bar = NO;
+ wait_for_tab_bar = NO;
#ifdef NS_IMPL_COCOA
willUseFullScreenPresentationOptions:
(NSApplicationPresentationOptions)proposedOptions
{
- return proposedOptions|NSApplicationPresentationAutoHideTabbar|NSApplicationPresentationAutoHideToolbar;
+ return proposedOptions|NSApplicationPresentationAutoHideToolbar;
}
#endif
}
else
{
- BOOL tarbar_visible = FRAME_EXTERNAL_TAB_BAR (emacsframe) ? YES : NO;
+ BOOL tarbar_visible = NO;
BOOL toolbar_visible = FRAME_EXTERNAL_TOOL_BAR (emacsframe) ? YES : NO;
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 \
&& MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
[self updateCollectionBehavior];
#endif
- if (FRAME_EXTERNAL_TAB_BAR (emacsframe))
- {
- [tabbar setVisible:YES];
- update_frame_tab_bar (emacsframe);
- [self updateFrameSize:YES];
- [[self window] display];
- }
- else
- [tabbar setVisible:NO];
+ [tabbar setVisible:NO];
if (FRAME_EXTERNAL_TOOL_BAR (emacsframe))
{
*prop_idx = XFIXNUM (prop);
*close_p = !NILP (Fget_text_property (make_fixnum (charpos),
- Qclose,
+ Qclose_tab,
f->current_tab_bar_string));
return true;
clear_mouse_face (hlinfo);
+#ifndef HAVE_NS
/* Mouse is down, but on different tab-bar item? */
mouse_down_p = (gui_mouse_grabbed (dpyinfo)
&& f == dpyinfo->last_mouse_frame);
return;
draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED;
+#else
+ draw = DRAW_IMAGE_RAISED;
+#endif /* HAVE_NS */
/* If tab-bar item is not enabled, don't highlight it. */
enabled_p = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_ENABLED_P);
Vmake_cursor_line_fully_visible = Qt;
DEFSYM (Qmake_cursor_line_fully_visible, "make-cursor-line-fully-visible");
+ DEFSYM (Qclose_tab, "close-tab");
DEFVAR_LISP ("tab-bar-border", Vtab_bar_border,
doc: /* Border below tab-bar in pixels.
If an integer, use it as the height of the border.