diff options
author | Juri Linkov <juri@linkov.net> | 2019-09-16 23:46:42 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2019-09-16 23:46:42 +0300 |
commit | e3e0920b9f30fd996fb880dc97268e821ab72e82 (patch) | |
tree | 3e20497949947504a73453eeb7c1bc50a99fb5cd /src | |
parent | 6474abc36359a438338e5d6186dbeaf24f200387 (diff) | |
download | emacs-e3e0920b9f30fd996fb880dc97268e821ab72e82.tar.gz |
Try to fix macOS and Windows issues.
Diffstat (limited to 'src')
-rw-r--r-- | src/nsfns.m | 29 | ||||
-rw-r--r-- | src/nsterm.m | 19 | ||||
-rw-r--r-- | src/xdisp.c | 7 |
3 files changed, 13 insertions, 42 deletions
diff --git a/src/nsfns.m b/src/nsfns.m index 890da99082b..308586ef5a8 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -632,32 +632,7 @@ ns_set_tab_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) 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 @@ -1371,7 +1346,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, 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, diff --git a/src/nsterm.m b/src/nsterm.m index d95f7b90064..ff2d195d2fa 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1089,7 +1089,7 @@ ns_update_begin (struct frame *f) 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]; @@ -7328,8 +7328,7 @@ not_in_argv (NSString *arg) /* 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 @@ -7756,7 +7755,7 @@ not_in_argv (NSString *arg) willUseFullScreenPresentationOptions: (NSApplicationPresentationOptions)proposedOptions { - return proposedOptions|NSApplicationPresentationAutoHideTabbar|NSApplicationPresentationAutoHideToolbar; + return proposedOptions|NSApplicationPresentationAutoHideToolbar; } #endif @@ -7788,7 +7787,7 @@ not_in_argv (NSString *arg) } 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 @@ -7850,15 +7849,7 @@ not_in_argv (NSString *arg) #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)) { diff --git a/src/xdisp.c b/src/xdisp.c index f4386884184..197493bfbb8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13178,7 +13178,7 @@ tab_bar_item_info (struct frame *f, struct glyph *glyph, int *prop_idx, bool *cl *prop_idx = XFIXNUM (prop); *close_p = !NILP (Fget_text_property (make_fixnum (charpos), - Qclose, + Qclose_tab, f->current_tab_bar_string)); return true; @@ -13348,6 +13348,7 @@ note_tab_bar_highlight (struct frame *f, int x, int y) 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); @@ -13356,6 +13357,9 @@ note_tab_bar_highlight (struct frame *f, int x, int y) 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); @@ -34343,6 +34347,7 @@ window, nil if it's okay to leave the cursor partially-visible. */); 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. |