GNU bug report logs -
#34516
Multi-monitor frame sets
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sun, 17 Feb 2019 21:10:02 UTC
Severity: normal
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #124 received at 34516 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Thu, 28 Mar 2019 23:57:43 +0200, Juri Linkov <juri <at> linkov.net> said:
Juri> Thanks for the hint. Now I added the default value to
Juri> make-frame-on-monitor, so for the current monitor you can
Juri> just do: M-x make-frame-on-monitor RET RET
>>
>> Thanks for that. I guess we can close the bug, if it isnʼt
>> closed already.
Juri> But what about your implementation of monitor names for
Juri> macOS?
The fake ones? I guess I can push that, unless we have a working way
to get the real ones. I havenʼt had a chance to look at the other
project suggested by someone on this thread, nor do I know what
license itʼs under. Current version below.
Robert
From abcc4431240f9a9b3b9d8a22b3acbdb30b28f7d4 Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim <at> gmail.com>
Date: Thu, 28 Feb 2019 10:13:05 +0100
Subject: [PATCH] Provide a fallback monitor name on macOS
To: emacs-devel <at> gnu.org
The fix for Bug#34516 provides a way to make a frame on a specific
monitor. It relies on monitor names being available, which is not the
case for recent versions of macOS, so provide fake ones of the form
Monitorx.
* src/nsfns.m (Fns_display_monitor_attributes_list): Provide a
fallback for the monitor name if the existing methods don't work.
---
src/nsfns.m | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/nsfns.m b/src/nsfns.m
index ee7598a1c7..3c4d8c91f3 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -2587,6 +2587,12 @@ Frames are listed from topmost (first) to bottommost (last). */)
#ifdef NS_IMPL_COCOA
m->name = ns_screen_name (did);
+ if (m->name == NULL) /* Fallback value. */
+ {
+ char name[28];
+ snprintf (name, sizeof(name), "Monitor%lu", i+1);
+ m->name = xstrdup (name);
+ }
{
CGSize mms = CGDisplayScreenSize (did);
--
2.21.0.196.g041f5ea1cf
This bug report was last modified 6 years and 51 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.