Created
August 16, 2020 22:10
-
-
Save railwaycat/c48cc2ea545a9d29521e092662661311 to your computer and use it in GitHub Desktop.
multi-tty patch for Emacs Mac port for 27.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lisp/server.el b/lisp/server.el | |
index 5efba17a01..357a6e5945 100644 | |
--- a/lisp/server.el | |
+++ b/lisp/server.el | |
@@ -1182,10 +1182,9 @@ The following commands are accepted by the client: | |
;; choice there.) In daemon mode on Windows, we can't | |
;; make tty frames, so force the frame type to GUI | |
;; there too. | |
- (when (or (and (eq system-type 'windows-nt) | |
- (or (daemonp) | |
- (eq window-system 'w32))) | |
- (eq window-system 'mac)) | |
+ (when (and (eq system-type 'windows-nt) | |
+ (or (daemonp) | |
+ (eq window-system 'w32))) | |
(push "-window-system" args-left))) | |
;; -position +LINE[:COLUMN]: Set point to the given | |
diff --git a/src/frame.c b/src/frame.c | |
index 843312ab78..52685b1f23 100644 | |
--- a/src/frame.c | |
+++ b/src/frame.c | |
@@ -1267,12 +1267,8 @@ affects all frames on the same terminal device. */) | |
emacs_abort (); | |
#else /* not MSDOS */ | |
-#if defined WINDOWSNT || defined HAVE_MACGUI /* This should work now! */ | |
- if (sf->output_method != output_termcap | |
-#ifdef HAVE_MACGUI | |
- && sf->output_method != output_initial | |
-#endif | |
- ) | |
+#ifdef WINDOWSNT /* This should work now! */ | |
+ if (sf->output_method != output_termcap) | |
error ("Not using an ASCII terminal now; cannot make a new ASCII frame"); | |
#endif | |
#endif /* not MSDOS */ | |
diff --git a/src/macterm.c b/src/macterm.c | |
index a565779d4e..f8384eeaaf 100644 | |
--- a/src/macterm.c | |
+++ b/src/macterm.c | |
@@ -2946,6 +2946,7 @@ mac_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, | |
{ | |
struct frame *f1; | |
struct mac_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp); | |
+ struct frame *sf = SELECTED_FRAME (); | |
block_input (); | |
@@ -2966,7 +2967,7 @@ mac_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, | |
else | |
f1 = XFRAME (mac_event_frame ()); | |
- if (f1) | |
+ if (f1 && sf->output_method != output_termcap) | |
{ | |
/* Ok, we found a frame. Store all the values. | |
last_mouse_glyph is a rectangle used to reduce the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
based on PR https://bitbucket.org/mituharu/emacs-mac/pull-requests/2/add-multi-tty-support-to-be-on-par-with/