Jones Stephen writes: > Thank you for the recent patch. I wanted to let you know that after > using the latest version of Emacs, I found that the fullscreen issue > has been resolved, which is great news—thank you for that! > > However, I’m still encountering an issue with the frame position after > the system wakes from sleep. Here’s how to reproduce it: > > 1. Open Emacs. > 2. Use a window management tool like Rectangle to position Emacs on one side of the screen. > 3. Put macOS to sleep. > 4. Wait for a while, approximately 30 minutes. > 5. Wake up macOS, enter the login password, and then focus back on Emacs. > > At this point, the frame position seems to be incorrect. I can reproduce this here. > Interestingly, when I use Rectangle to move Emacs to the other side of > the screen, the position issue is resolved. > > I believe this could be related to missing a system wake notification. > Perhaps adding something like: > > ```swift > NotificationCenter.default.addObserver( > self, > selector: #selector(systemDidWake), > name: NSWorkspace.didWakeNotification, > object: nil > ) > ``` > > and calling `adjustEmacsFrameRect` in the callback could address this > issue. Alternatively, calling `adjustEmacsFrameRect` whenever > `windowDidBecomeKey` is triggered might also work. > Indeed, that seems to work, although I find it strage that something like that is necessary. But what do I know. Could you please try the attached patch?