Commit 6c37fb0
committed
ui_cocoa: gate setActivationPolicy: on 10.6+ SDK
GCC 4.0 (Xcode 3.1, PowerPC) reports:
ui_cocoa.m:1450: error: 'NSApplicationActivationPolicyRegular'
undeclared (first use in this function)
NSApplication's setActivationPolicy: method and the matching
NSApplicationActivationPolicy* enum were introduced in 10.6 Snow
Leopard. On the 10.5 SDK neither exists.
Before 10.6, apps declared themselves as regular GUI apps through
Info.plist (CFBundlePackageType=APPL, absence of LSUIElement and
LSBackgroundOnly). The PPC bundle already has this, so skipping
the runtime call is effectively a no-op on Leopard/Tiger.
Wrap the call in #ifdef MAC_OS_X_VERSION_10_6 — a gate pattern the
file already uses at lines 169 and 618. Modern builds are
unaffected.1 parent d38dcb5 commit 6c37fb0
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1447 | 1447 | | |
1448 | 1448 | | |
1449 | 1449 | | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
1450 | 1455 | | |
| 1456 | + | |
1451 | 1457 | | |
1452 | 1458 | | |
1453 | 1459 | | |
| |||
0 commit comments