Merge remote-tracking branch 'savannah/master' into HEAD
This commit is contained in:
commit
7438001385
18 changed files with 195 additions and 58 deletions
|
@ -217,10 +217,15 @@ default bound to scrolling with the @key{Ctrl} modifier.
|
|||
@vindex mouse-wheel-tilt-scroll
|
||||
@vindex mouse-wheel-flip-direction
|
||||
Emacs can also support horizontal scrolling if your mouse's wheel can
|
||||
be tilted. This feature is off by default; the variable
|
||||
@code{mouse-wheel-tilt-scroll} turns it on. If you'd like to reverse
|
||||
the direction of horizontal scrolling, customize the variable
|
||||
@code{mouse-wheel-flip-direction} to a non-@code{nil} value.
|
||||
be tilted, or if your touchpad supports it. This feature is off by
|
||||
default; the variable @code{mouse-wheel-tilt-scroll} turns it on, if
|
||||
you customize it to a non-@code{nil} value. By default, tilting the
|
||||
mouse wheel scrolls the window's view horizontally in the direction of
|
||||
the tilt: e.g., tilting to the right scrolls the window to the right,
|
||||
so that the text displayed in the window moves horizontally to the
|
||||
left. If you'd like to reverse the direction of horizontal scrolling,
|
||||
customize the variable @code{mouse-wheel-flip-direction} to a
|
||||
non-@code{nil} value.
|
||||
|
||||
When the mouse pointer is over an image, scrolling the mouse wheel
|
||||
with the @key{Ctrl} modifier scales the image under the mouse pointer.
|
||||
|
|
|
@ -1021,8 +1021,8 @@ or, using shorter synonyms and written more compactly,
|
|||
@example
|
||||
@group
|
||||
(rx "/*"
|
||||
(* (| (not (any "*"))
|
||||
(: "*" (not (any "/")))))
|
||||
(* (| (not "*")
|
||||
(: "*" (not "/"))))
|
||||
(+ "*") "/")
|
||||
@end group
|
||||
@end example
|
||||
|
|
10
etc/NEWS.27
10
etc/NEWS.27
|
@ -360,6 +360,14 @@ its '--eval' command-line option), as well as in
|
|||
'lisp-interaction-mode' and 'ielm-mode', used in the "*scratch*" and
|
||||
"*ielm*" buffers.
|
||||
|
||||
We envision that most Lisp code is already either written with
|
||||
lexical-binding in mind, or will work unchanged under
|
||||
lexical-binding. If, for some reason, your code used in 'M-:' or
|
||||
'--eval' doesn't work as result of this change, either modify the code
|
||||
to work with lexical binding, or wrap it in an extra level of 'eval'.
|
||||
For example, --eval FORM becomes --eval "(eval 'FORM)" (note the extra
|
||||
quote in 'FORM).
|
||||
|
||||
---
|
||||
** The new user option 'tooltip-resize-echo-area' avoids truncating
|
||||
tooltip text on GUI frames when tooltips are displayed in the echo
|
||||
|
@ -779,7 +787,7 @@ an offset to absolute line numbers.
|
|||
** table
|
||||
|
||||
+++
|
||||
*** 'table-generate-source' now supports wiki and mediawiki
|
||||
*** 'table-generate-source' now supports wiki and mediawiki.
|
||||
This command can now output wiki and mediawiki format tables.
|
||||
|
||||
** telnet-mode
|
||||
|
|
|
@ -72,8 +72,7 @@ strings case-insensitively."
|
|||
(cond ((eq x y) t)
|
||||
((stringp x)
|
||||
(and (stringp y) (= (length x) (length y))
|
||||
(or (string-equal x y)
|
||||
(string-equal (downcase x) (downcase y))))) ;Lazy but simple!
|
||||
(eq (compare-strings x nil nil y nil nil t) t)))
|
||||
((numberp x)
|
||||
(and (numberp y) (= x y)))
|
||||
((consp x)
|
||||
|
|
|
@ -2045,7 +2045,7 @@ Mark the installed package as selected by adding it to
|
|||
|
||||
When called from Lisp and optional argument DONT-SELECT is
|
||||
non-nil, install the package but do not add it to
|
||||
`package-select-packages'.
|
||||
`package-selected-packages'.
|
||||
|
||||
If PKG is a `package-desc' and it is already installed, don't try
|
||||
to install it but still mark it as selected."
|
||||
|
@ -3042,6 +3042,7 @@ column in the header line."
|
|||
|
||||
(defun package-menu--generate (remember-pos &optional packages keywords)
|
||||
"Populate and display the Package Menu.
|
||||
If REMEMBER-POS is non-nil, keep point on the same entry.
|
||||
PACKAGES should be t, which means to display all known packages,
|
||||
or a list of package names (symbols) to display.
|
||||
|
||||
|
|
|
@ -2688,11 +2688,7 @@ See also `toggle-frame-maximized'."
|
|||
(set-frame-parameter frame 'fullscreen fullscreen-restore)
|
||||
(set-frame-parameter frame 'fullscreen nil)))
|
||||
(modify-frame-parameters
|
||||
frame `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen))))
|
||||
;; Manipulating a frame without waiting for the fullscreen
|
||||
;; animation to complete can cause a crash, or other unexpected
|
||||
;; behavior, on macOS (bug#28496).
|
||||
(when (featurep 'cocoa) (sleep-for 0.5))))
|
||||
frame `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen))))))
|
||||
|
||||
|
||||
;;;; Key bindings
|
||||
|
|
|
@ -547,8 +547,7 @@ type detected."
|
|||
new-parts))
|
||||
(setq cid (1+ cid)))))))
|
||||
;; We have local images that we want to include.
|
||||
(if (not new-parts)
|
||||
(list cont)
|
||||
(when new-parts
|
||||
(setcdr (assq 'contents cont) (buffer-string))
|
||||
(setq cont
|
||||
(nconc (list 'multipart (cons 'type "related"))
|
||||
|
@ -561,8 +560,8 @@ type detected."
|
|||
(nth 1 new-part)
|
||||
(nth 2 new-part))
|
||||
(id . ,(concat "<" (nth 0 new-part)
|
||||
">")))))))
|
||||
cont))))
|
||||
">"))))))))
|
||||
cont)))
|
||||
|
||||
(autoload 'image-property "image")
|
||||
|
||||
|
|
|
@ -145,13 +145,19 @@ face height."
|
|||
;;; For tilt-scroll
|
||||
;;;
|
||||
(defcustom mouse-wheel-tilt-scroll nil
|
||||
"Enable scroll using tilting mouse wheel."
|
||||
"Enable horizontal scrolling by tilting mouse wheel or via touchpad.
|
||||
Also see `mouse-wheel-flip-direction'."
|
||||
:group 'mouse
|
||||
:type 'boolean
|
||||
:version "26.1")
|
||||
|
||||
(defcustom mouse-wheel-flip-direction nil
|
||||
"Swap direction of `wheel-right' and `wheel-left'."
|
||||
"Swap direction of `wheel-right' and `wheel-left'.
|
||||
By default, `wheel-right' scrolls the text to the right,
|
||||
and `wheel-left' scrolls in the other direction.
|
||||
If this variable is non-nil, it inverts the direction of
|
||||
horizontal scrolling by tilting the mouse wheel.
|
||||
Also see `mouse-wheel-tilt-scroll'."
|
||||
:group 'mouse
|
||||
:type 'boolean
|
||||
:version "26.1")
|
||||
|
|
|
@ -2626,12 +2626,16 @@ the only argument."
|
|||
(and ;; nickserv
|
||||
(string= sender "NickServ")
|
||||
(string= target rcirc-nick)
|
||||
(member message
|
||||
(list
|
||||
(format "You are now identified for \C-b%s\C-b." rcirc-nick)
|
||||
(format "You are successfully identified as \C-b%s\C-b." rcirc-nick)
|
||||
"Password accepted - you are now recognized."
|
||||
)))
|
||||
(cl-member
|
||||
message
|
||||
(list
|
||||
(format "You are now identified for \C-b%s\C-b." rcirc-nick)
|
||||
(format "You are successfully identified as \C-b%s\C-b."
|
||||
rcirc-nick)
|
||||
"Password accepted - you are now recognized.")
|
||||
;; The nick may have a different case, so match
|
||||
;; case-insensitively (Bug#39345).
|
||||
:test #'cl-equalp))
|
||||
(and ;; quakenet
|
||||
(string= sender "Q")
|
||||
(string= target rcirc-nick)
|
||||
|
|
|
@ -4195,18 +4195,21 @@ performed successfully. Any other value means an error."
|
|||
(defun tramp-accept-process-output (proc &optional timeout)
|
||||
"Like `accept-process-output' for Tramp processes.
|
||||
This is needed in order to hide `last-coding-system-used', which is set
|
||||
for process communication also."
|
||||
for process communication also.
|
||||
If the user quits via `C-g', it is propagated up to `tramp-file-name-handler'."
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(let ((inhibit-read-only t)
|
||||
last-coding-system-used
|
||||
result)
|
||||
;; JUST-THIS-ONE is set due to Bug#12145.
|
||||
(tramp-message
|
||||
proc 10 "%s %s %s %s\n%s"
|
||||
proc timeout (process-status proc)
|
||||
(with-local-quit
|
||||
(setq result (accept-process-output proc timeout nil t)))
|
||||
(buffer-string))
|
||||
;; JUST-THIS-ONE is set due to Bug#12145. `with-local-quit'
|
||||
;; returns t in order to report success.
|
||||
(if (with-local-quit
|
||||
(setq result (accept-process-output proc timeout nil t)) t)
|
||||
(tramp-message
|
||||
proc 10 "%s %s %s %s\n%s"
|
||||
proc timeout (process-status proc) result (buffer-string))
|
||||
;; Propagate quit.
|
||||
(keyboard-quit))
|
||||
result)))
|
||||
|
||||
(defun tramp-search-regexp (regexp)
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
|
||||
;;; Variables also used at compile time.
|
||||
|
||||
(defconst c-version "5.34"
|
||||
(defconst c-version "5.34.2"
|
||||
"CC Mode version number.")
|
||||
|
||||
(defconst c-version-sym (intern c-version))
|
||||
|
|
|
@ -1046,7 +1046,10 @@ no input, and GDB is waiting for input."
|
|||
|
||||
(declare-function tooltip-show "tooltip" (text &optional use-echo-area))
|
||||
|
||||
(defconst gdb--string-regexp "\"\\(?:[^\\\"]\\|\\\\.\\)*\"")
|
||||
(defconst gdb--string-regexp (rx "\""
|
||||
(* (or (seq "\\" nonl)
|
||||
(not (any "\"\\"))))
|
||||
"\""))
|
||||
|
||||
(defun gdb-tooltip-print (expr)
|
||||
(with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
|
||||
|
|
|
@ -2987,13 +2987,18 @@ This finishes the change group by reverting all of its changes."
|
|||
;; the body of `atomic-change-group' all changes can be undone.
|
||||
(widen)
|
||||
(let ((old-car (car-safe elt))
|
||||
(old-cdr (cdr-safe elt)))
|
||||
(old-cdr (cdr-safe elt))
|
||||
;; Use `pending-undo-list' temporarily since `undo-more' needs
|
||||
;; it, but restore it afterwards so as not to mess with an
|
||||
;; ongoing sequence of `undo's.
|
||||
(pending-undo-list
|
||||
;; Use `buffer-undo-list' unconditionally (bug#39680).
|
||||
buffer-undo-list))
|
||||
(unwind-protect
|
||||
(progn
|
||||
;; Temporarily truncate the undo log at ELT.
|
||||
(when (consp elt)
|
||||
(setcar elt nil) (setcdr elt nil))
|
||||
(unless (eq last-command 'undo) (undo-start))
|
||||
;; Make sure there's no confusion.
|
||||
(when (and (consp elt) (not (eq elt (last pending-undo-list))))
|
||||
(error "Undoing to some unrelated state"))
|
||||
|
|
|
@ -123,7 +123,8 @@ Possible modifiers are `control', `meta', `shift', `hyper', `super' and
|
|||
(assq-delete-all 'tab-bar-lines
|
||||
default-frame-alist)))))
|
||||
|
||||
(when (and tab-bar-mode (not (get-text-property 0 'display tab-bar-new-button)))
|
||||
(when (and tab-bar-mode tab-bar-new-button
|
||||
(not (get-text-property 0 'display tab-bar-new-button)))
|
||||
;; This file is pre-loaded so only here we can use the right data-directory:
|
||||
(add-text-properties 0 (length tab-bar-new-button)
|
||||
`(display (image :type xpm
|
||||
|
@ -132,7 +133,8 @@ Possible modifiers are `control', `meta', `shift', `hyper', `super' and
|
|||
:ascent center))
|
||||
tab-bar-new-button))
|
||||
|
||||
(when (and tab-bar-mode (not (get-text-property 0 'display tab-bar-close-button)))
|
||||
(when (and tab-bar-mode tab-bar-close-button
|
||||
(not (get-text-property 0 'display tab-bar-close-button)))
|
||||
;; This file is pre-loaded so only here we can use the right data-directory:
|
||||
(add-text-properties 0 (length tab-bar-close-button)
|
||||
`(display (image :type xpm
|
||||
|
@ -263,6 +265,17 @@ before calling the command that adds a new tab."
|
|||
:group 'tab-bar
|
||||
:version "27.1")
|
||||
|
||||
(defcustom tab-bar-new-button-show t
|
||||
"If non-nil, show the \"New tab\" button in the tab bar.
|
||||
When this is nil, you can create new tabs with \\[tab-new]."
|
||||
:type 'boolean
|
||||
:initialize 'custom-initialize-default
|
||||
:set (lambda (sym val)
|
||||
(set-default sym val)
|
||||
(force-mode-line-update))
|
||||
:group 'tab-bar
|
||||
:version "27.1")
|
||||
|
||||
(defvar tab-bar-new-button " + "
|
||||
"Button for creating a new tab.")
|
||||
|
||||
|
@ -306,7 +319,8 @@ This helps to select the tab by its number using `tab-bar-select-tab'."
|
|||
:group 'tab-bar
|
||||
:version "27.1")
|
||||
|
||||
(defvar tab-bar-separator nil)
|
||||
(defvar tab-bar-separator nil
|
||||
"String that delimits tabs.")
|
||||
|
||||
|
||||
(defcustom tab-bar-tab-name-function #'tab-bar-tab-name-current
|
||||
|
@ -464,9 +478,9 @@ Return its existing value or a new value."
|
|||
(interactive)
|
||||
(tab-bar-close-tab ,i)))))))
|
||||
tabs)
|
||||
(when tab-bar-new-button
|
||||
`((sep-add-tab menu-item ,separator ignore)
|
||||
(add-tab menu-item ,tab-bar-new-button tab-bar-new-tab
|
||||
`((sep-add-tab menu-item ,separator ignore))
|
||||
(when (and tab-bar-new-button-show tab-bar-new-button)
|
||||
`((add-tab menu-item ,tab-bar-new-button tab-bar-new-tab
|
||||
:help "New tab"))))))
|
||||
|
||||
|
||||
|
|
|
@ -238,14 +238,18 @@ bit output with no translation."
|
|||
;; value from x-select-font etc, so list the most important charsets last.
|
||||
(w32-add-charset-info "iso8859-14" 'w32-charset-ansi 28604)
|
||||
(w32-add-charset-info "iso8859-15" 'w32-charset-ansi 28605)
|
||||
(w32-add-charset-info "iso8859-16" 'w32-charset-ansi 28606)
|
||||
;; The following two are included for pattern matching.
|
||||
(w32-add-charset-info "jisx0201" 'w32-charset-shiftjis 932)
|
||||
(w32-add-charset-info "jisx0208" 'w32-charset-shiftjis 932)
|
||||
(w32-add-charset-info "jisx0201-latin" 'w32-charset-shiftjis 932)
|
||||
(w32-add-charset-info "jisx0201-katakana" 'w32-charset-shiftjis 932)
|
||||
(w32-add-charset-info "jisx0212" 'w32-charset-shiftjis 932)
|
||||
(w32-add-charset-info "ksc5601.1989" 'w32-charset-hangeul 949)
|
||||
(w32-add-charset-info "ksx1001" 'w32-charset-hangeul 949)
|
||||
(w32-add-charset-info "big5" 'w32-charset-chinesebig5 950)
|
||||
(w32-add-charset-info "gb2312.1980" 'w32-charset-gb2312 936)
|
||||
(w32-add-charset-info "gbk" 'w32-charset-gb2312 936)
|
||||
(w32-add-charset-info "ms-symbol" 'w32-charset-symbol nil)
|
||||
(w32-add-charset-info "ms-oem" 'w32-charset-oem 437)
|
||||
(w32-add-charset-info "ms-oemlatin" 'w32-charset-oem 850)
|
||||
|
@ -258,9 +262,12 @@ bit output with no translation."
|
|||
(w32-add-charset-info "iso8859-9" 'w32-charset-turkish 1254)
|
||||
(w32-add-charset-info "iso8859-13" 'w32-charset-baltic 1257)
|
||||
(w32-add-charset-info "koi8-r" 'w32-charset-russian 20866)
|
||||
(w32-add-charset-info "microsoft-cp1251" 'w32-charset-russian 1251)
|
||||
(w32-add-charset-info "windows-1251" 'w32-charset-russian 1251)
|
||||
(w32-add-charset-info "tis620-2533" 'w32-charset-russian 28595)
|
||||
(w32-add-charset-info "iso8859-11" 'w32-charset-thai 874)
|
||||
(w32-add-charset-info "windows-1258" 'w32-charset-vietnamese 1258)
|
||||
(w32-add-charset-info "viscii" 'w32-charset-vietnamese 1258)
|
||||
(w32-add-charset-info "ksc5601.1992" 'w32-charset-johab 1361)
|
||||
(w32-add-charset-info "mac-roman" 'w32-charset-mac 10000)
|
||||
(w32-add-charset-info "iso10646-1" 'w32-charset-default t)
|
||||
|
|
|
@ -72,7 +72,7 @@ end
|
|||
|
||||
define xgetsym
|
||||
xgetptr $arg0
|
||||
set $ptr = ((struct Lisp_Symbol *) ((char *)lispsym + $ptr))
|
||||
set $ptr = ((struct Lisp_Symbol *) ((char *) &lispsym + $ptr))
|
||||
end
|
||||
|
||||
# Access the name of a symbol
|
||||
|
|
|
@ -433,6 +433,7 @@ typedef id instancetype;
|
|||
int maximized_width, maximized_height;
|
||||
NSWindow *nonfs_window;
|
||||
BOOL fs_is_native;
|
||||
BOOL in_fullscreen_transition;
|
||||
#ifdef NS_DRAW_TO_BUFFER
|
||||
CGContextRef drawingBuffer;
|
||||
#endif
|
||||
|
@ -467,6 +468,8 @@ typedef id instancetype;
|
|||
- (void) toggleFullScreen: (id) sender;
|
||||
- (BOOL) fsIsNative;
|
||||
- (BOOL) isFullscreen;
|
||||
- (BOOL) inFullScreenTransition;
|
||||
- (void) waitFullScreenTransition;
|
||||
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
- (void) updateCollectionBehavior;
|
||||
#endif
|
||||
|
@ -1286,6 +1289,7 @@ extern char gnustep_base_version[]; /* version tracking */
|
|||
#if !defined (NS_IMPL_COCOA) || !defined (MAC_OS_X_VERSION_10_7)
|
||||
#define NSFullScreenWindowMask (1 << 14)
|
||||
#define NSWindowCollectionBehaviorFullScreenPrimary (1 << 7)
|
||||
#define NSWindowCollectionBehaviorFullScreenAuxiliary (1 << 8)
|
||||
#define NSApplicationPresentationFullScreen (1 << 10)
|
||||
#define NSApplicationPresentationAutoHideToolbar (1 << 11)
|
||||
#define NSAppKitVersionNumber10_7 1138
|
||||
|
|
107
src/nsterm.m
107
src/nsterm.m
|
@ -1571,9 +1571,12 @@ -(void)remove
|
|||
|
||||
/* Making a new frame from a fullscreen frame will make the new frame
|
||||
fullscreen also. So skip handleFS as this will print an error. */
|
||||
if ([view fsIsNative] && f->want_fullscreen == FULLSCREEN_BOTH
|
||||
&& [view isFullscreen])
|
||||
return;
|
||||
if ([view fsIsNative] && [view isFullscreen])
|
||||
{
|
||||
// maybe it is not necessary to wait
|
||||
[view waitFullScreenTransition];
|
||||
return;
|
||||
}
|
||||
|
||||
if (f->want_fullscreen != FULLSCREEN_NONE)
|
||||
{
|
||||
|
@ -1959,19 +1962,55 @@ so some key presses (TAB) are swallowed by the system. */
|
|||
block_input ();
|
||||
child = [FRAME_NS_VIEW (f) window];
|
||||
|
||||
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f);
|
||||
#endif
|
||||
|
||||
if ([child parentWindow] != nil)
|
||||
{
|
||||
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
parent = [child parentWindow];
|
||||
#endif
|
||||
|
||||
[[child parentWindow] removeChildWindow:child];
|
||||
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
|
||||
if ([child respondsToSelector:@selector(setAccessibilitySubrole:)])
|
||||
#endif
|
||||
[child setAccessibilitySubrole:NSAccessibilityStandardWindowSubrole];
|
||||
#endif
|
||||
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
if (NILP (new_value))
|
||||
{
|
||||
NSTRACE ("child setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary");
|
||||
[child setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
||||
// if current parent in fullscreen and no new parent make child fullscreen
|
||||
while (parent) {
|
||||
if (([parent styleMask] & NSWindowStyleMaskFullScreen) != 0)
|
||||
{
|
||||
[view toggleFullScreen:child];
|
||||
break;
|
||||
}
|
||||
// check all parents
|
||||
parent = [parent parentWindow];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!NILP (new_value))
|
||||
{
|
||||
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
// child frame must not be in fullscreen
|
||||
if ([view fsIsNative] && [view isFullscreen])
|
||||
{
|
||||
// in case child is going fullscreen
|
||||
[view waitFullScreenTransition];
|
||||
[view toggleFullScreen:child];
|
||||
}
|
||||
NSTRACE ("child setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary");
|
||||
[child setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
|
||||
#endif
|
||||
parent = [FRAME_NS_VIEW (p) window];
|
||||
|
||||
[parent addChildWindow: child
|
||||
|
@ -7398,6 +7437,7 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
|
|||
#endif
|
||||
fs_is_native = ns_use_native_fullscreen;
|
||||
#endif
|
||||
in_fullscreen_transition = NO;
|
||||
|
||||
maximized_width = maximized_height = -1;
|
||||
nonfs_window = nil;
|
||||
|
@ -7431,7 +7471,10 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
|
|||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
|
||||
if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_7)
|
||||
#endif
|
||||
[win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
||||
if (FRAME_PARENT_FRAME (f))
|
||||
[win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
|
||||
else
|
||||
[win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
||||
#endif
|
||||
|
||||
wr = [win frame];
|
||||
|
@ -7554,11 +7597,12 @@ - (void)windowDidMove: sender
|
|||
emacsframe->top_pos =
|
||||
NS_PARENT_WINDOW_TOP_POS (emacsframe) - (r.origin.y + r.size.height);
|
||||
|
||||
if (emacs_event)
|
||||
{
|
||||
emacs_event->kind = MOVE_FRAME_EVENT;
|
||||
EV_TRAILER ((id)nil);
|
||||
}
|
||||
// FIXME: after event part below didExitFullScreen is not received
|
||||
// if (emacs_event)
|
||||
// {
|
||||
// emacs_event->kind = MOVE_FRAME_EVENT;
|
||||
// EV_TRAILER ((id)nil);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7758,6 +7802,7 @@ - (NSApplicationPresentationOptions)window:(NSWindow *)window
|
|||
- (void)windowWillEnterFullScreen:(NSNotification *)notification
|
||||
{
|
||||
NSTRACE ("[EmacsView windowWillEnterFullScreen:]");
|
||||
in_fullscreen_transition = YES;
|
||||
[self windowWillEnterFullScreen];
|
||||
}
|
||||
- (void)windowWillEnterFullScreen /* provided for direct calls */
|
||||
|
@ -7770,6 +7815,7 @@ - (void)windowDidEnterFullScreen:(NSNotification *)notification
|
|||
{
|
||||
NSTRACE ("[EmacsView windowDidEnterFullScreen:]");
|
||||
[self windowDidEnterFullScreen];
|
||||
in_fullscreen_transition = NO;
|
||||
}
|
||||
|
||||
- (void)windowDidEnterFullScreen /* provided for direct calls */
|
||||
|
@ -7808,6 +7854,7 @@ - (void)windowDidEnterFullScreen /* provided for direct calls */
|
|||
- (void)windowWillExitFullScreen:(NSNotification *)notification
|
||||
{
|
||||
NSTRACE ("[EmacsView windowWillExitFullScreen:]");
|
||||
in_fullscreen_transition = YES;
|
||||
[self windowWillExitFullScreen];
|
||||
}
|
||||
|
||||
|
@ -7827,6 +7874,7 @@ - (void)windowDidExitFullScreen:(NSNotification *)notification
|
|||
{
|
||||
NSTRACE ("[EmacsView windowDidExitFullScreen:]");
|
||||
[self windowDidExitFullScreen];
|
||||
in_fullscreen_transition = NO;
|
||||
}
|
||||
|
||||
- (void)windowDidExitFullScreen /* provided for direct calls */
|
||||
|
@ -7856,6 +7904,22 @@ - (void)windowDidExitFullScreen /* provided for direct calls */
|
|||
[[self window] performZoom:self];
|
||||
}
|
||||
|
||||
- (BOOL)inFullScreenTransition
|
||||
{
|
||||
return in_fullscreen_transition;
|
||||
}
|
||||
|
||||
- (void)waitFullScreenTransition
|
||||
{
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
while ([self inFullScreenTransition])
|
||||
{
|
||||
NSTRACE ("wait for fullscreen");
|
||||
wait_reading_process_output (0, 300000000, 0, 1, Qnil, NULL, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
- (BOOL)fsIsNative
|
||||
{
|
||||
return fs_is_native;
|
||||
|
@ -7894,9 +7958,22 @@ - (void)updateCollectionBehavior
|
|||
NSWindow *win = [self window];
|
||||
NSWindowCollectionBehavior b = [win collectionBehavior];
|
||||
if (ns_use_native_fullscreen)
|
||||
b |= NSWindowCollectionBehaviorFullScreenPrimary;
|
||||
{
|
||||
if ([win parentWindow])
|
||||
{
|
||||
b &= ~NSWindowCollectionBehaviorFullScreenPrimary;
|
||||
b |= NSWindowCollectionBehaviorFullScreenAuxiliary;
|
||||
}
|
||||
else
|
||||
{
|
||||
b |= NSWindowCollectionBehaviorFullScreenPrimary;
|
||||
b &= ~NSWindowCollectionBehaviorFullScreenAuxiliary;
|
||||
}
|
||||
}
|
||||
else
|
||||
b &= ~NSWindowCollectionBehaviorFullScreenPrimary;
|
||||
{
|
||||
b &= ~NSWindowCollectionBehaviorFullScreenPrimary;
|
||||
}
|
||||
|
||||
[win setCollectionBehavior: b];
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
|
||||
|
@ -7922,8 +7999,14 @@ - (void)toggleFullScreen: (id)sender
|
|||
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
|
||||
if ([[self window] respondsToSelector: @selector(toggleFullScreen:)])
|
||||
{
|
||||
#endif
|
||||
[[self window] toggleFullScreen:sender];
|
||||
// wait for fullscreen animation complete (bug#28496)
|
||||
[self waitFullScreenTransition];
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
|
||||
}
|
||||
#endif
|
||||
[[self window] toggleFullScreen:sender];
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue