Skip to content

cocoawindowcontext: Skip unavailable system buttons (fixes crash) - #242

Open
Zoinen wants to merge 1 commit into
stdware:mainfrom
Zoinen:zoin/macos-null-system-buttons
Open

cocoawindowcontext: Skip unavailable system buttons (fixes crash)#242
Zoinen wants to merge 1 commit into
stdware:mainfrom
Zoinen:zoin/macos-null-system-buttons

Conversation

@Zoinen

@Zoinen Zoinen commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Skip unavailable macOS standard window buttons when constructing the observer list.
  • Prevent an Objective-C exception when a tool or modal window does not provide all three traffic-light buttons.

-[NSMutableArray addObject:] does not accept nil, while standardWindowButton: may return nil for buttons omitted by a particular window style.

Testing

Configured and built QWindowKit on macOS with:

  • QWINDOWKIT_BUILD_QUICK=ON
  • QWINDOWKIT_BUILD_WIDGETS=OFF
  • QWINDOWKIT_BUILD_EXAMPLES=OFF

Both QWKCore and QWKQuick built successfully.

@Zoinen Zoinen changed the title cocoawindowcontext: Skip unavailable system buttons cocoawindowcontext: Skip unavailable system buttons (fixes crash) Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant