[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34516: Multi-monitor frame sets
From: |
Robert Pluim |
Subject: |
bug#34516: Multi-monitor frame sets |
Date: |
Fri, 29 Mar 2019 09:16:54 +0100 |
>>>>> On Thu, 28 Mar 2019 23:57:43 +0200, Juri Linkov <juri@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@gmail.com>
Date: Thu, 28 Feb 2019 10:13:05 +0100
Subject: [PATCH] Provide a fallback monitor name on macOS
To: emacs-devel@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
- bug#34516: Multi-monitor frame sets, (continued)
- bug#34516: Multi-monitor frame sets, Andy Moreton, 2019/03/04
- bug#34516: Multi-monitor frame sets, Robert Pluim, 2019/03/04
- bug#34516: Multi-monitor frame sets, Alan Third, 2019/03/04
- bug#34516: Multi-monitor frame sets, Robert Pluim, 2019/03/04
- bug#34516: Multi-monitor frame sets, Juri Linkov, 2019/03/19
- bug#34516: Multi-monitor frame sets, Robert Pluim, 2019/03/26
- bug#34516: Multi-monitor frame sets, Robert Pluim, 2019/03/26
- bug#34516: Multi-monitor frame sets, Juri Linkov, 2019/03/27
- bug#34516: Multi-monitor frame sets, Robert Pluim, 2019/03/28
- bug#34516: Multi-monitor frame sets, Juri Linkov, 2019/03/28
- Message not available
- bug#34516: Multi-monitor frame sets,
Robert Pluim <=
- bug#34516: Multi-monitor frame sets, Juri Linkov, 2019/03/30
- Message not available
- bug#34516: Multi-monitor frame sets, Andy Moreton, 2019/03/04