* bug#43520: 27.1; [PATCH] Add support for make-pointer-invisible on macOS
[not found] <m1sgbdzkie.fsf.ref@yahoo.es>
@ 2020-09-19 18:31 ` Unknown
2020-09-19 19:16 ` Alan Third
0 siblings, 1 reply; 2+ messages in thread
From: Unknown @ 2020-09-19 18:31 UTC (permalink / raw)
To: 43520
[-- Attachment #1: Type: text/plain, Size: 88 bytes --]
The following patch adds proper support for make-pointer-invisible on
macOS.
Thanks.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Honor-make-pointer-invisible-on-macOS.patch --]
[-- Type: text/x-patch, Size: 1322 bytes --]
From ad92732d28a484d538a4e98331878a0f60e07fd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= <mardani29@yahoo.es>
Date: Sat, 19 Sep 2020 20:19:57 +0200
Subject: [PATCH] Honor make-pointer-invisible on macOS
* src/nsterm.m: Call [NSCursor setHiddenUntilMouseMoves:] with the
correct argument, depending on variable make-pointer-invisible.
---
etc/NEWS | 3 +++
src/nsterm.m | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index 26aa030391..363d843265 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -145,6 +145,9 @@ your init file:
(setq frame-title-format '(multiple-frames "%b"
("" invocation-name "@" system-name)))
+---
+** The variable 'make-pointer-invisible' is now honored on macOS.
+
\f
* Editing Changes in Emacs 28.1
diff --git a/src/nsterm.m b/src/nsterm.m
index 26059ab67c..f6a36c8fdc 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6449,7 +6449,7 @@ most recently updated (I guess), which is not the correct one. */
if (nsEvArray == nil)
nsEvArray = [[NSMutableArray alloc] initWithCapacity: 1];
- [NSCursor setHiddenUntilMouseMoves: YES];
+ [NSCursor setHiddenUntilMouseMoves:! NILP (Vmake_pointer_invisible)];
if (hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight))
{
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread