diff options
| author | Juri Linkov | 2019-09-16 23:46:42 +0300 |
|---|---|---|
| committer | Juri Linkov | 2019-09-16 23:46:42 +0300 |
| commit | e3e0920b9f30fd996fb880dc97268e821ab72e82 (patch) | |
| tree | 3e20497949947504a73453eeb7c1bc50a99fb5cd /src | |
| parent | 6474abc36359a438338e5d6186dbeaf24f200387 (diff) | |
| download | emacs-e3e0920b9f30fd996fb880dc97268e821ab72e82.tar.gz emacs-e3e0920b9f30fd996fb880dc97268e821ab72e82.zip | |
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) | |||
| 632 | nlines = 0; | 632 | nlines = 0; |
| 633 | 633 | ||
| 634 | if (nlines) | 634 | if (nlines) |
| 635 | { | 635 | update_frame_tab_bar (f); |
| 636 | FRAME_EXTERNAL_TAB_BAR (f) = 1; | ||
| 637 | update_frame_tab_bar (f); | ||
| 638 | } | ||
| 639 | else | ||
| 640 | { | ||
| 641 | if (FRAME_EXTERNAL_TAB_BAR (f)) | ||
| 642 | { | ||
| 643 | free_frame_tab_bar (f); | ||
| 644 | FRAME_EXTERNAL_TAB_BAR (f) = 0; | ||
| 645 | |||
| 646 | { | ||
| 647 | EmacsView *view = FRAME_NS_VIEW (f); | ||
| 648 | int fs_state = [view fullscreenState]; | ||
| 649 | |||
| 650 | if (fs_state == FULLSCREEN_MAXIMIZED) | ||
| 651 | { | ||
| 652 | [view setFSValue:FULLSCREEN_WIDTH]; | ||
| 653 | } | ||
| 654 | else if (fs_state == FULLSCREEN_HEIGHT) | ||
| 655 | { | ||
| 656 | [view setFSValue:FULLSCREEN_NONE]; | ||
| 657 | } | ||
| 658 | } | ||
| 659 | } | ||
| 660 | } | ||
| 661 | 636 | ||
| 662 | { | 637 | { |
| 663 | int inhibit | 638 | int inhibit |
| @@ -1371,7 +1346,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, | |||
| 1371 | RES_TYPE_STRING); | 1346 | RES_TYPE_STRING); |
| 1372 | 1347 | ||
| 1373 | parms = get_geometry_from_preferences (dpyinfo, parms); | 1348 | parms = get_geometry_from_preferences (dpyinfo, parms); |
| 1374 | window_prompting = gui_figure_window_size (f, parms, true, | 1349 | window_prompting = gui_figure_window_size (f, parms, true, true, |
| 1375 | &x_width, &x_height); | 1350 | &x_width, &x_height); |
| 1376 | 1351 | ||
| 1377 | tem = gui_display_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, | 1352 | 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) | |||
| 1089 | if ([view isFullscreen] && [view fsIsNative]) | 1089 | if ([view isFullscreen] && [view fsIsNative]) |
| 1090 | { | 1090 | { |
| 1091 | // Fix reappearing tool bar or tab bar in fullscreen for Mac OS X 10.7 | 1091 | // Fix reappearing tool bar or tab bar in fullscreen for Mac OS X 10.7 |
| 1092 | BOOL tarbar_visible = FRAME_EXTERNAL_TAB_BAR (f) ? YES : NO; | 1092 | BOOL tarbar_visible = NO; |
| 1093 | NSToolbar *tabbar = [FRAME_NS_VIEW (f) tabbar]; | 1093 | NSToolbar *tabbar = [FRAME_NS_VIEW (f) tabbar]; |
| 1094 | if (! tarbar_visible != ! [tabbar isVisible]) | 1094 | if (! tarbar_visible != ! [tabbar isVisible]) |
| 1095 | [tabbar setVisible: tarbar_visible]; | 1095 | [tabbar setVisible: tarbar_visible]; |
| @@ -7328,8 +7328,7 @@ not_in_argv (NSString *arg) | |||
| 7328 | 7328 | ||
| 7329 | /* Don't set frame garbaged until tab bar is up to date? | 7329 | /* Don't set frame garbaged until tab bar is up to date? |
| 7330 | This avoids an extra clear and redraw (flicker) at frame creation. */ | 7330 | This avoids an extra clear and redraw (flicker) at frame creation. */ |
| 7331 | if (FRAME_EXTERNAL_TAB_BAR (f)) wait_for_tab_bar = YES; | 7331 | wait_for_tab_bar = NO; |
| 7332 | else wait_for_tab_bar = NO; | ||
| 7333 | 7332 | ||
| 7334 | 7333 | ||
| 7335 | #ifdef NS_IMPL_COCOA | 7334 | #ifdef NS_IMPL_COCOA |
| @@ -7756,7 +7755,7 @@ not_in_argv (NSString *arg) | |||
| 7756 | willUseFullScreenPresentationOptions: | 7755 | willUseFullScreenPresentationOptions: |
| 7757 | (NSApplicationPresentationOptions)proposedOptions | 7756 | (NSApplicationPresentationOptions)proposedOptions |
| 7758 | { | 7757 | { |
| 7759 | return proposedOptions|NSApplicationPresentationAutoHideTabbar|NSApplicationPresentationAutoHideToolbar; | 7758 | return proposedOptions|NSApplicationPresentationAutoHideToolbar; |
| 7760 | } | 7759 | } |
| 7761 | #endif | 7760 | #endif |
| 7762 | 7761 | ||
| @@ -7788,7 +7787,7 @@ not_in_argv (NSString *arg) | |||
| 7788 | } | 7787 | } |
| 7789 | else | 7788 | else |
| 7790 | { | 7789 | { |
| 7791 | BOOL tarbar_visible = FRAME_EXTERNAL_TAB_BAR (emacsframe) ? YES : NO; | 7790 | BOOL tarbar_visible = NO; |
| 7792 | BOOL toolbar_visible = FRAME_EXTERNAL_TOOL_BAR (emacsframe) ? YES : NO; | 7791 | BOOL toolbar_visible = FRAME_EXTERNAL_TOOL_BAR (emacsframe) ? YES : NO; |
| 7793 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 \ | 7792 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 \ |
| 7794 | && MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 | 7793 | && MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 |
| @@ -7850,15 +7849,7 @@ not_in_argv (NSString *arg) | |||
| 7850 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 | 7849 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 |
| 7851 | [self updateCollectionBehavior]; | 7850 | [self updateCollectionBehavior]; |
| 7852 | #endif | 7851 | #endif |
| 7853 | if (FRAME_EXTERNAL_TAB_BAR (emacsframe)) | 7852 | [tabbar setVisible:NO]; |
| 7854 | { | ||
| 7855 | [tabbar setVisible:YES]; | ||
| 7856 | update_frame_tab_bar (emacsframe); | ||
| 7857 | [self updateFrameSize:YES]; | ||
| 7858 | [[self window] display]; | ||
| 7859 | } | ||
| 7860 | else | ||
| 7861 | [tabbar setVisible:NO]; | ||
| 7862 | 7853 | ||
| 7863 | if (FRAME_EXTERNAL_TOOL_BAR (emacsframe)) | 7854 | if (FRAME_EXTERNAL_TOOL_BAR (emacsframe)) |
| 7864 | { | 7855 | { |
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 | |||
| 13178 | *prop_idx = XFIXNUM (prop); | 13178 | *prop_idx = XFIXNUM (prop); |
| 13179 | 13179 | ||
| 13180 | *close_p = !NILP (Fget_text_property (make_fixnum (charpos), | 13180 | *close_p = !NILP (Fget_text_property (make_fixnum (charpos), |
| 13181 | Qclose, | 13181 | Qclose_tab, |
| 13182 | f->current_tab_bar_string)); | 13182 | f->current_tab_bar_string)); |
| 13183 | 13183 | ||
| 13184 | return true; | 13184 | return true; |
| @@ -13348,6 +13348,7 @@ note_tab_bar_highlight (struct frame *f, int x, int y) | |||
| 13348 | 13348 | ||
| 13349 | clear_mouse_face (hlinfo); | 13349 | clear_mouse_face (hlinfo); |
| 13350 | 13350 | ||
| 13351 | #ifndef HAVE_NS | ||
| 13351 | /* Mouse is down, but on different tab-bar item? */ | 13352 | /* Mouse is down, but on different tab-bar item? */ |
| 13352 | mouse_down_p = (gui_mouse_grabbed (dpyinfo) | 13353 | mouse_down_p = (gui_mouse_grabbed (dpyinfo) |
| 13353 | && f == dpyinfo->last_mouse_frame); | 13354 | && f == dpyinfo->last_mouse_frame); |
| @@ -13356,6 +13357,9 @@ note_tab_bar_highlight (struct frame *f, int x, int y) | |||
| 13356 | return; | 13357 | return; |
| 13357 | 13358 | ||
| 13358 | draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED; | 13359 | draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED; |
| 13360 | #else | ||
| 13361 | draw = DRAW_IMAGE_RAISED; | ||
| 13362 | #endif /* HAVE_NS */ | ||
| 13359 | 13363 | ||
| 13360 | /* If tab-bar item is not enabled, don't highlight it. */ | 13364 | /* If tab-bar item is not enabled, don't highlight it. */ |
| 13361 | enabled_p = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_ENABLED_P); | 13365 | 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. */); | |||
| 34343 | Vmake_cursor_line_fully_visible = Qt; | 34347 | Vmake_cursor_line_fully_visible = Qt; |
| 34344 | DEFSYM (Qmake_cursor_line_fully_visible, "make-cursor-line-fully-visible"); | 34348 | DEFSYM (Qmake_cursor_line_fully_visible, "make-cursor-line-fully-visible"); |
| 34345 | 34349 | ||
| 34350 | DEFSYM (Qclose_tab, "close-tab"); | ||
| 34346 | DEFVAR_LISP ("tab-bar-border", Vtab_bar_border, | 34351 | DEFVAR_LISP ("tab-bar-border", Vtab_bar_border, |
| 34347 | doc: /* Border below tab-bar in pixels. | 34352 | doc: /* Border below tab-bar in pixels. |
| 34348 | If an integer, use it as the height of the border. | 34353 | If an integer, use it as the height of the border. |