all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Aaron Jensen <aaronjensen@gmail.com>
To: Alan Third <alan@idiocy.org>
Cc: 28443@debbugs.gnu.org
Subject: bug#28443: 26.0.50; Pause when fullscreening when ns-use-native-fullscreen is nil on macOS
Date: Sat, 16 Nov 2024 23:37:13 -0500	[thread overview]
Message-ID: <CAHyO48yxZ0qY3vmScDL9SESxg0gohr+7HLXQTe0nWVMzNRdaOQ@mail.gmail.com> (raw)
In-Reply-To: <20170913201301.GB31742@breton.holly.idiocy.org>


[-- Attachment #1.1: Type: text/plain, Size: 2222 bytes --]

I can no longer reproduce any issues with setting the frame-default-alist,
so this patch removes the timer workaround. I'm using macOS 15.1, no idea
if that's relevant or not.


Aaron


On Wed, Sep 13, 2017 at 1:13 PM, Alan Third <alan@idiocy.org> wrote:

> On Wed, Sep 13, 2017 at 12:33:48PM -0700, Aaron Jensen wrote:
>
> On Wed, Sep 13, 2017 at 12:27 PM, Alan Third <alan@idiocy.org> wrote:
>
> On Wed, Sep 13, 2017 at 05:15:49AM -0700, Aaron Jensen wrote:
>
> When ns-use-native-fullscreen is nil and a frame is set to fullscreen,
> there is a slight pause before the frame goes fullscreen. I believe the
> pause is about the same length as the animation when native fullscreen is
> used, so I'm wondering if there's some timing code in there that can be
> disabled when non-native fullscreen is being used.
>
> Found it. In ns_fullscreen_hook in nsterm.m there is a timer:
>
> /* Old style fs don't initiate correctly if created from
> init/default-frame alist, so use a timer (not nice...).
> */
> [NSTimer scheduledTimerWithTimeInterval: 0.5 target: view selector:
> @selector (handleFS)
> userInfo: nil repeats: NO];
>
> if I replace the timer with
>
> [view handleFS]
>
> it works absolutely fine, but I have to assume there are situations where
> it doesn’t.
>
> My guess is that the timer was there to sync w/ the animation. If the
> animation is disabled, there shouldn't be a timer, but if it is, there
> should be. This is just a guess.
>
> I should have read it a bit more closely. The comment’s saying there’s a
> problem when
>
> (add-to-list ’frame-default-alist ’(fullscreen . fullboth))
>
> is used, and sure enough, when I set it and create a new frame, it draws
> incorrectly.
>
> I notice that changing back from fullscreen results in the top of the
> emacs window being hidden behind the toolbar. Clearly non‐native fullscreen
> has some resizing issues.
>
> It can be (correctly) emulated with:
>
> (set-frame-parameter nil 'undecorated t)
> (setq ns-auto-hide-menu-bar 1)
> (tool-bar-mode -1)
> (toggle-frame-maximized)
>
> which makes me wonder if we even need this code and could move it to lisp?
> --
> Alan Third
>

[-- Attachment #1.2: Type: text/html, Size: 3651 bytes --]

[-- Attachment #2: 0001-src-nsterm.m-ns_fullscreen_hook-Remove-timer-workaro.patch --]
[-- Type: application/octet-stream, Size: 1022 bytes --]

From 176e3a3410e12ba5b59c6ddb927c8cb3099f3b7f Mon Sep 17 00:00:00 2001
From: Aaron Jensen <aaronjensen@gmail.com>
Date: Sat, 16 Nov 2024 20:32:41 -0800
Subject: [PATCH] * src/nsterm.m (ns_fullscreen_hook): Remove timer workaround

---
 src/nsterm.m | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index 47ce20455c5..dabc36ce018 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1984,16 +1984,6 @@ Hide the window (X11 semantics)
   if (!FRAME_VISIBLE_P (f))
     return;
 
-   if (! [view fsIsNative] && f->want_fullscreen == FULLSCREEN_BOTH)
-    {
-      /* Old style fs don't initiate correctly if created from
-         init/default-frame alist, so use a timer (not nice...).  */
-      [NSTimer scheduledTimerWithTimeInterval: 0.5 target: view
-                                     selector: @selector (handleFS)
-                                     userInfo: nil repeats: NO];
-      return;
-    }
-
   block_input ();
   [view handleFS];
   unblock_input ();
-- 
2.47.0


  reply	other threads:[~2024-11-17  4:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 12:15 bug#28443: 26.0.50; Pause when fullscreening when ns-use-native-fullscreen is nil on macOS Aaron Jensen
2017-09-13 17:01 ` Alan Third
2017-09-13 19:27 ` Alan Third
2017-09-13 19:33   ` Aaron Jensen
2017-09-13 20:13     ` Alan Third
2024-11-17  4:37       ` Aaron Jensen [this message]
2024-11-17 11:58         ` Alan Third
2024-11-17 16:22           ` Aaron Jensen
2024-11-17 18:27             ` Alan Third
2024-11-17 18:34               ` Aaron Jensen
2024-11-19 21:38                 ` Alan Third
2024-11-24 12:11         ` Alan Third

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=CAHyO48yxZ0qY3vmScDL9SESxg0gohr+7HLXQTe0nWVMzNRdaOQ@mail.gmail.com \
    --to=aaronjensen@gmail.com \
    --cc=28443@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    /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.