Skip to content

macOS: Store UUID in MonitorHandle instead of CGDirectDisplayID#4167

Merged
madsmtm merged 1 commit into
masterfrom
madsmtm/macos-monitor-handle-uuid
Apr 29, 2025
Merged

macOS: Store UUID in MonitorHandle instead of CGDirectDisplayID#4167
madsmtm merged 1 commit into
masterfrom
madsmtm/macos-monitor-handle-uuid

Conversation

@madsmtm
Copy link
Copy Markdown
Member

@madsmtm madsmtm commented Mar 17, 2025

The monitor UUID is what actually represents the monitor, CGDirectDisplayID is closer in correspondence to a configured framebuffer. We've already been doing comparisons on the UUID for a while, let's finish this by also storing the UUID.

Fixes #4166.

I have created a branch for backporting this onto v0.30 here.

  • Tested on all platforms changed
  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

@madsmtm madsmtm added B - bug Dang, that shouldn't have happened DS - appkit Affects the AppKit/macOS backend labels Mar 17, 2025
@madsmtm madsmtm force-pushed the madsmtm/macos-monitor-handle-uuid branch 2 times, most recently from b3ee234 to 7aa7092 Compare March 17, 2025 08:52
@Braymatter
Copy link
Copy Markdown

Is this something that would also affect iOS? Anecdotally I've had a lot of crashes in my app when resuming after a long period of time

@madsmtm
Copy link
Copy Markdown
Member Author

madsmtm commented Mar 17, 2025

Is this something that would also affect iOS? Anecdotally I've had a lot of crashes in my app when resuming after a long period of time

I don't think so, the MonitorHandle implementation is completely different there.

@madsmtm madsmtm mentioned this pull request Apr 29, 2025
@madsmtm madsmtm force-pushed the madsmtm/macos-monitor-handle-uuid branch from 7aa7092 to bba577b Compare April 29, 2025 09:53
The monitor UUID is what actually represents the monitor,
CGDirectDisplayID is closer in correspondence to a specific framebuffer.
@madsmtm madsmtm force-pushed the madsmtm/macos-monitor-handle-uuid branch from bba577b to d6c7dc2 Compare April 29, 2025 10:02
@madsmtm madsmtm merged commit 1800fa1 into master Apr 29, 2025
57 checks passed
@madsmtm madsmtm deleted the madsmtm/macos-monitor-handle-uuid branch April 29, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B - bug Dang, that shouldn't have happened DS - appkit Affects the AppKit/macOS backend

Development

Successfully merging this pull request may close these issues.

MacOs - Putting System to Sleep / Suspending Causes MonitorHandle::uuid to panic

2 participants