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)

   58 files     58 suites   7m 15s ⏱️
4 550 tests 4 306 ✅ 244 💤 0 ❌
2 168 runs  2 106 ✅  62 💤 0 ❌

Results for commit d3dd5f2.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review April 10, 2026 09:56
@HeikoKlare HeikoKlare force-pushed the copilot/remove-deprecated-macos-constants branch 2 times, most recently from 4241424 to 859589f Compare April 14, 2026 19:40
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 859589f to d3dd5f2 Compare April 16, 2026 17:52
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