Skip to content

[Cocoa] Replace deprecated macOS Window Style Mask constants#3216

Open
HeikoKlare wants to merge 1 commit intoeclipse-platform:masterfrom
HeikoKlare:copilot/remove-deprecated-macos-constants
Open

[Cocoa] Replace deprecated macOS Window Style Mask constants#3216
HeikoKlare wants to merge 1 commit intoeclipse-platform:masterfrom
HeikoKlare:copilot/remove-deprecated-macos-constants

Conversation

@HeikoKlare
Copy link
Copy Markdown
Contributor

The macOS AppKit framework deprecated the old-style window style mask constants in macOS 10.12 (Sierra) in favour of a new NSWindowStyleMask option set type. This change replaces all nine deprecated constants throughout the SWT macOS/Cocoa implementation with their modern equivalents, eliminating compiler deprecation warnings and improving forward compatibility with future macOS SDK versions.

Affected files

  • OS.java — constant declarations updated
  • AppKitFull.bridgesupport / .extras — enum entries updated for code-generation consistency
  • Shell.java, Display.java, Tracker.java, Printer.java — call sites updated

Constant mapping (values unchanged)

Before After
NSBorderlessWindowMask NSWindowStyleMaskBorderless
NSClosableWindowMask NSWindowStyleMaskClosable
NSDocModalWindowMask NSWindowStyleMaskDocModalWindow
NSFullScreenWindowMask NSWindowStyleMaskFullScreen
NSMiniaturizableWindowMask NSWindowStyleMaskMiniaturizable
NSNonactivatingPanelMask NSWindowStyleMaskNonactivatingPanel
NSResizableWindowMask NSWindowStyleMaskResizable
NSTitledWindowMask NSWindowStyleMaskTitled
NSUtilityWindowMask NSWindowStyleMaskUtilityWindow

Contributes to #3214

Created with the help of Copilot.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

Test Results (macos)

   54 files  ±0     54 suites  ±0   8m 8s ⏱️ +16s
4 531 tests ±0  4 287 ✅ ±0  244 💤 ±0  0 ❌ ±0 
2 130 runs  ±0  2 068 ✅ ±0   62 💤 ±0  0 ❌ ±0 

Results for commit 4241424. ± Comparison against base commit 16e501f.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review April 10, 2026 09:56
The macOS AppKit framework deprecated the old-style window style mask
constants in macOS 10.12 (Sierra) in favour of a new NSWindowStyleMask
option set type. This change replaces all nine deprecated constants
throughout the SWT macOS/Cocoa implementation with their modern
equivalents, eliminating compiler deprecation warnings and improving
forward compatibility with future macOS SDK versions.

Replaced constants (values are unchanged):
  NSBorderlessWindowMask       -> NSWindowStyleMaskBorderless       (0)
  NSClosableWindowMask         -> NSWindowStyleMaskClosable          (2)
  NSDocModalWindowMask         -> NSWindowStyleMaskDocModalWindow    (64)
  NSFullScreenWindowMask       -> NSWindowStyleMaskFullScreen        (16384)
  NSMiniaturizableWindowMask   -> NSWindowStyleMaskMiniaturizable    (4)
  NSNonactivatingPanelMask     -> NSWindowStyleMaskNonactivatingPanel(128)
  NSResizableWindowMask        -> NSWindowStyleMaskResizable         (8)
  NSTitledWindowMask           -> NSWindowStyleMaskTitled            (1)
  NSUtilityWindowMask          -> NSWindowStyleMaskUtilityWindow     (16)

Contributes to eclipse-platform#3214
@HeikoKlare HeikoKlare force-pushed the copilot/remove-deprecated-macos-constants branch from 7374949 to 4241424 Compare April 10, 2026 15:14
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