[PR #469] [MERGED] Fix #397 (invisible windows) #1630

Closed
opened 2026-03-03 19:08:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/PlayCover/PlayCover/pull/469
Author: @jslegendre
Created: 10/31/2022
Status: Merged
Merged: 10/31/2022
Merged by: @JoseMoreville

Base: developHead: invisible-windows-fix


📝 Commits (1)

📊 Changes

1 file changed (+0 additions, -2 deletions)

View changed files

📝 PlayCover/Model/AppInfo.swift (+0 -2)

📄 Description

Do not add UISupportsTrueScreenSizeOnMac to apps.

Per Apple documentation, this key tells macOS the app is (among other things) capable of handling any display size and "all conceivable aspect ratios", which is obviously something we can't presume. I can image this would (if the window was visible) cause other bugs to pop up around UI and input mapping.

Finally, the actual reason windows aren't visible is actually pretty simple. The root application delegate class for iOS on Mac apps (UINSApplicationDelegate) receives a didCreateUIScene callback (or notification, didn't look much further into it) on didCreateUIScene:transitionContextDictionary: which falls through to _configureWindowControllerCreatingIfNeededForScene:transitionContextDictionary:, where the main window controller is created. The root class for iOS on Mac (and Catalyst) window controllers is UINSSceneWindowController which has a method called _showWindowPostLoadIsFirstWindow:transitionContextDictionary: (invoked during _configureWindowController...) which checks for the UISupportsTrueScreenSizeOnMac key and SKIPS calling [NSWindow makeKeyAndOrderFront:] if found.

tl;dr: Window controller never calls [NSWindow makeKeyAndOrderFront:] if UISupportsTrueScreenSizeOnMac is true.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/PlayCover/PlayCover/pull/469 **Author:** [@jslegendre](https://github.com/jslegendre) **Created:** 10/31/2022 **Status:** ✅ Merged **Merged:** 10/31/2022 **Merged by:** [@JoseMoreville](https://github.com/JoseMoreville) **Base:** `develop` ← **Head:** `invisible-windows-fix` --- ### 📝 Commits (1) - [`3426ee5`](https://github.com/PlayCover/PlayCover/commit/3426ee5e9a795b6d5b64389d46b56f608abf348a) Fix #397 ### 📊 Changes **1 file changed** (+0 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `PlayCover/Model/AppInfo.swift` (+0 -2) </details> ### 📄 Description Do not add `UISupportsTrueScreenSizeOnMac` to apps. Per Apple documentation, this key tells macOS the app is (among other things) capable of handling any display size and "all conceivable aspect ratios", which is obviously something we can't presume. I can image this would (if the window was visible) cause other bugs to pop up around UI and input mapping. Finally, the actual reason windows aren't visible is actually pretty simple. The root application delegate class for iOS on Mac apps (`UINSApplicationDelegate`) receives a `didCreateUIScene` callback (or notification, didn't look much further into it) on `didCreateUIScene:transitionContextDictionary:` which falls through to `_configureWindowControllerCreatingIfNeededForScene:transitionContextDictionary:`, where the main window controller is created. The root class for iOS on Mac (and Catalyst) window controllers is `UINSSceneWindowController` which has a method called `_showWindowPostLoadIsFirstWindow:transitionContextDictionary:` (invoked during `_configureWindowController...`) which checks for the `UISupportsTrueScreenSizeOnMac` key and SKIPS calling `[NSWindow makeKeyAndOrderFront:]` if found. tl;dr: Window controller never calls `[NSWindow makeKeyAndOrderFront:]` if `UISupportsTrueScreenSizeOnMac` is true. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 19:08:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PlayCover#1630
No description provided.