From: Robert Pluim <rpluim@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: 34516@debbugs.gnu.org, Alan Third <alan@idiocy.org>,
Andy Moreton <andrewjmoreton@gmail.com>
Subject: bug#34516: Multi-monitor frame sets
Date: Fri, 29 Mar 2019 09:16:54 +0100 [thread overview]
Message-ID: <m236n6gknd.fsf@gmail.com> (raw)
In-Reply-To: <87bm3a74s4.fsf@mail.linkov.net>
>>>>> 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
next prev parent reply other threads:[~2019-03-29 8:16 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-17 19:34 bug#34516: Multi-monitor frame sets Juri Linkov
2019-02-18 10:47 ` Robert Pluim
2019-02-18 21:03 ` Juri Linkov
2019-02-19 9:17 ` Robert Pluim
2019-02-23 20:43 ` Juri Linkov
2019-02-24 12:56 ` Robert Pluim
2019-02-24 21:08 ` Juri Linkov
2019-02-24 22:11 ` Andy Moreton
2019-02-25 21:11 ` Juri Linkov
2019-03-02 20:54 ` Alan Third
2019-03-02 23:57 ` Andy Moreton
2019-03-03 11:43 ` Alan Third
2019-03-04 9:52 ` Robert Pluim
2019-03-04 13:56 ` Andy Moreton
2019-03-04 16:10 ` Robert Pluim
2019-03-04 19:20 ` Alan Third
2019-03-04 20:18 ` Robert Pluim
2019-03-19 21:33 ` Juri Linkov
2019-03-26 7:24 ` Robert Pluim
2019-03-26 7:26 ` Robert Pluim
2019-03-27 21:46 ` Juri Linkov
2019-03-28 7:56 ` Robert Pluim
2019-03-28 21:57 ` Juri Linkov
2019-02-18 16:48 ` Eli Zaretskii
2019-02-18 21:16 ` Juri Linkov
2019-02-19 3:32 ` Eli Zaretskii
2019-02-19 21:37 ` Juri Linkov
2019-02-19 10:40 ` Andy Moreton
2019-02-19 21:31 ` Juri Linkov
2019-02-19 23:29 ` Andy Moreton
2019-02-20 21:20 ` Juri Linkov
2019-02-20 21:38 ` Andy Moreton
2019-02-23 20:48 ` Juri Linkov
2019-02-24 8:44 ` martin rudalics
2019-02-24 21:08 ` Juri Linkov
2019-02-24 22:13 ` Andy Moreton
2019-02-25 10:13 ` martin rudalics
2019-02-25 15:00 ` Andy Moreton
2019-03-05 0:44 ` Andy Moreton
2019-03-29 8:16 ` Robert Pluim [this message]
2019-03-30 21:47 ` Juri Linkov
2019-04-01 11:29 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m236n6gknd.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=34516@debbugs.gnu.org \
--cc=alan@idiocy.org \
--cc=andrewjmoreton@gmail.com \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.