GNU bug report logs -
#61525
29.0.60; delete-frame will raise frames in another virtual desktop
Previous Next
Reported by: Kai Ma <justksqsf <at> gmail.com>
Date: Wed, 15 Feb 2023 04:27:02 UTC
Severity: normal
Tags: patch
Found in version 29.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 26 Aug 2023 11:06:21 +0300
with message-id <83y1hykz2a.fsf <at> gnu.org>
and subject line Re: bug#61525: 29.0.60; delete-frame will raise frames in another virtual desktop
has caused the debbugs.gnu.org bug report #61525,
regarding 29.0.60; delete-frame will raise frames in another virtual desktop
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
61525: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61525
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
On MacOS, delete-frame can raise a frame in another virtual desktop,
which will cause switching between desktops. This is annoying,
especially for emacsclient users.
To quote frame.c:
#ifdef NS_IMPL_COCOA
else
/* Under NS, there is no system mechanism for choosing a new
window to get focus -- it is left to application code.
So the portion of THIS application interfacing with NS
needs to know about it. We call Fraise_frame, but the
purpose is really to transfer focus. */
Fraise_frame (frame1);
#endif
However, this has an undesired side effect: the desktop will be
switched.
Steps to reproduce:
1. Run emacs.
2. C-x 5 2, and move the new frame to another desktop.
3. C-x 5 0. Now you see the desktop is switched.
This is a known issue for some time [1] and there is a patch that simply
disables raise_frame [2]. I'm not sure whether this patch is entirely
correct (and I think not). But I do think the behavior should be
improved; at least the undesired desktop switching should be avoided.
Best regards,
Kai
[1] https://xenodium.com/no-emacs-frame-refocus-on-macos/
[2] https://github.com/d12frosted/homebrew-emacs-plus/blob/master/patches/emacs-28/no-frame-refocus-cocoa.patch
[Message part 3 (message/rfc822, inline)]
> From: Daniel Martín <mardani29 <at> yahoo.es>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 61525 <at> debbugs.gnu.org, justksqsf <at> gmail.com
> Date: Sat, 19 Aug 2023 10:28:48 +0200
>
> Po Lu <luangruo <at> yahoo.com> writes:
>
> > Daniel Martín <mardani29 <at> yahoo.es> writes:
> >
> >> * src/frame.h: Declare an NS-only function to make a frame the key
> >> window.
> >> * src/nsfns.m (ns_make_frame_key_window): Implement it.
> >> * src/frame.c (delete_frame): Call ns_make_frame_key_window instead of
> >> Fraise_frame. (Bug#61525)
> >
> > This commit message extends into column 70. Please fill it to 64
> > columns, or else the ChangeLog entries generated will be incorrectly
> > formatted.
>
> I've attached a new patch with the commit message wrapped at 64 columns.
Thanks, installed on the master branch, and closing the bug.
This bug report was last modified 1 year and 270 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.