Author: manolo
Date: 2012-12-03 13:20:54 -0800 (Mon, 03 Dec 2012)
New Revision: 9735
Log:
Fix STR #2890: MacOS unbundled applications don't appear in dock nor menu bar
and don't get keyboard focus.
Modified:
branches/branch-3.0/src/fltk3/cocoa.mm
Modified: branches/branch-3.0/src/fltk3/cocoa.mm
===================================================================
--- branches/branch-3.0/src/fltk3/cocoa.mm 2012-11-30 18:20:36 UTC (rev
9734)
+++ branches/branch-3.0/src/fltk3/cocoa.mm 2012-12-03 21:20:54 UTC (rev
9735)
@@ -1321,9 +1321,10 @@
// only transform the application type for unbundled apps
NSBundle *bundle = [NSBundle mainBundle];
if (bundle) {
- NSString *exe = [bundle executablePath];
+ NSString *exe = [[bundle executablePath] stringByStandardizingPath];
NSString *bpath = [bundle bundlePath];
- if ([bpath isEqualToString:exe]) bundle = nil;
+ NSString *exe_dir = [exe stringByDeletingLastPathComponent];
+ if ([bpath isEqualToString:exe] || [bpath isEqualToString:exe_dir])
bundle = nil;
}
if ( !bundle )
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit