all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Alan Third <alan@idiocy.org>
Cc: Jones Stephen <happyojones@gmail.com>, 71912@debbugs.gnu.org
Subject: bug#71912: 30.0.50; Inaccurate window-absolute-pixel-position Values on macOS After Sleep and During Fullscreen Mode
Date: Fri, 26 Jul 2024 22:32:20 +0200	[thread overview]
Message-ID: <m2plqz51yj.fsf@pro2.fritz.box> (raw)
In-Reply-To: <m2y15onecv.fsf@pro2.fritz.box> ("Gerd Möllmann"'s message of "Fri, 26 Jul 2024 21:27:12 +0200")

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Alan Third <alan@idiocy.org> writes:
>
>> On Thu, Jul 25, 2024 at 09:39:16AM +0200, Gerd Möllmann wrote:
>>> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>>> 
>>> The following patch for master addresses this at least partially. Part
>>> of the problem is, it appears to me, is that windowDidMove is not called
>>> when entering/exiting fullscreen mode, so that a frame's left_pos and
>>> top_pos are not adjusted. The patch tries to fix that. I haven't found
>>> out what to do with the frame parameters top and left.
>>
>> If you look at toggleFullScreen it creates a new NSWindow for
>> switching to fullscreen, or re-uses the old non-fullscreen NSWindow
>> when switching out of fullscreen, so the windows don't move.
>>
>> You can actually just call windowDidMove directly. I'd suggest doing
>> it at the end of toggleFullScreen.
>
> Thanks, I'll give that a try tomorrow.

Tried it today :-).

And it looks like toggleFullScreen is somehow not being used. When I
press the green button to go into fullscreen, I land in
windowDidEnterFullscreen, but it's called directly from AppKit. Similar
for exiting fullscreen.

* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 8.1
    frame #0: 0x0000000100365e54 emacs`-[EmacsView windowDidEnterFullScreen](self=0x000000014860f930, _cmd="windowDidEnterFullScreen") at nsterm.m:8350:4
    frame #1: 0x0000000100365e30 emacs`-[EmacsView windowDidEnterFullScreen:](self=0x000000014860f930, _cmd="windowDidEnterFullScreen:", notification=@"NSWindowDidEnterFullScreenNotification") at nsterm.m:8344:3
  frame #2: 0x0000000191b4f144 CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
  frame #3: 0x0000000191be33d8 CoreFoundation`___CFXRegistrationPost_block_invoke + 88
  frame #4: 0x0000000191be3320 CoreFoundation`_CFXRegistrationPost + 440
  frame #5: 0x0000000191b1d678 CoreFoundation`_CFXNotificationPost + 768
  frame #6: 0x0000000192c3a4e4 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 88
  frame #7: 0x00000001961742b8 AppKit`-[NSWindow(NSFullScreen) _didEnterFullScreen] + 92
  frame #8: 0x0000000195f568d8 AppKit`-[_NSEnterFullScreenTransitionController doAfterEnterFullScreen] + 208
  frame #9: 0x0000000195f57710 AppKit`-[_NSEnterFullScreenTransitionController _performFinalTransitionCleanup] + 56
  frame #10: 0x0000000195f5767c AppKit`__68-[_NSEnterFullScreenTransitionController _startFullScreenTransition]_block_invoke + 236
  frame #11: 0x00000001918c8750 libdispatch.dylib`_dispatch_call_block_and_release + 32
  frame #12: 0x00000001918ca3e8 libdispatch.dylib`_dispatch_client_callout + 20
  frame #13: 0x00000001918d8bb8 libdispatch.dylib`_dispatch_main_queue_drain + 988
  frame #14: 0x00000001918d87cc libdispatch.dylib`_dispatch_main_queue_callback_4CF + 44
  frame #15: 0x0000000191b9bad4 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
  frame #16: 0x0000000191b59258 CoreFoundation`__CFRunLoopRun + 1996
  frame #17: 0x0000000191b58434 CoreFoundation`CFRunLoopRunSpecific + 608
  frame #18: 0x000000019c2fc19c HIToolbox`RunCurrentEventLoopInMode + 292
  frame #19: 0x000000019c2fbfd8 HIToolbox`ReceiveNextEventCommon + 648
  frame #20: 0x000000019c2fbd30 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 76
  frame #21: 0x00000001953b7d68 AppKit`_DPSNextEvent + 660
  frame #22: 0x0000000195bad808 AppKit`-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
  frame #23: 0x00000001953ab09c AppKit`-[NSApplication run] + 476
    frame #24: 0x000000010035b4bc emacs`-[EmacsApp run](self=0x0000000149005bf0, _cmd="run") at nsterm.m:5952:7
    frame #25: 0x0000000100359b38 emacs`ns_select_1(nfds=0, readfds=0x000000016fdfd24c, writefds=0x000000016fdfd1cc, exceptfds=0x0000000000000000, timeout=0x000000016fdfd1a0, sigmask=0x0000000000000000, run_loop_only=NO) at nsterm.m:4964:3
    frame #26: 0x00000001003596f8 emacs`ns_select(nfds=0, readfds=0x000000016fdfd24c, writefds=0x000000016fdfd1cc, exceptfds=0x0000000000000000, timeout=0x000000016fdfd1a0, sigmask=0x0000000000000000) at nsterm.m:5016:10
    frame #27: 0x00000001002cc594 emacs`wait_reading_process_output(time_limit=0, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=(struct Lisp_Symbol *) $0 = 0x0000000100a840d0, wait_proc=0x0000000000000000, just_wait_proc=0) at process.c:5748:18





  reply	other threads:[~2024-07-26 20:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-03  2:38 bug#71912: 30.0.50; Inaccurate window-absolute-pixel-position Values on macOS After Sleep and During Fullscreen Mode Jones Stephen
2024-07-23 11:06 ` Gerd Möllmann
2024-07-25  7:39   ` Gerd Möllmann
2024-07-26 19:24     ` Alan Third
2024-07-26 19:27       ` Gerd Möllmann
2024-07-26 20:32         ` Gerd Möllmann [this message]
2024-07-30  4:06     ` Gerd Möllmann
2024-08-11  6:49 ` bug#71912: [Gerd Möllmann] " Gerd Möllmann
     [not found]   ` <CAOFab0n2H3iwyAmVGV1nYrQVqcjRM=ovvJ5hTt4x_0r6rC_k3g@mail.gmail.com>
2024-08-11 11:25     ` Gerd Möllmann
     [not found]       ` <CAOFab0mKnZbku1bq3Y0uyZAr6hb1Pkc7gmV7xuxt1pMJq_AFXw@mail.gmail.com>
2024-08-12  3:16         ` Gerd Möllmann

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=m2plqz51yj.fsf@pro2.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=71912@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=happyojones@gmail.com \
    /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.