Added application activation.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-10-18 17:35:53 -07:00
1 parent 1691b6f07e
commit 6076185da7
3 files changed
+15

No files matched your search

+5
View File
@@ -298,6 +298,11 @@ CPRunContinuesResponse = -1002;
[CPPlatform terminateApplication];
}
- (void)activateIgnoringOtherApps:(BOOL)shouldIgnoreOtherApps
{
[CPPlatform activateIgnoringOtherApps:shouldIgnoreOtherApps];
}
/*!
Calls \c -finishLaunching method which results in starting
the main event loop.
+2
View File
@@ -1264,6 +1264,8 @@ CPTexturedBackgroundWindowMask
if (_leftMouseDownView != _firstResponder && [_leftMouseDownView acceptsFirstResponder])
[self makeFirstResponder:_leftMouseDownView];
[CPApp activateIgnoringOtherApps:YES];
var theWindow = [anEvent window];
if ([theWindow isKeyWindow] || [theWindow becomesKeyOnlyIfNeeded])
+8
View File
@@ -45,4 +45,12 @@
window.cpTerminate();
}
+ (void)activateIgnoringOtherApps:(BOOL)shouldIgnoreOtherApps
{
#if PLATFORM(DOM)
if (typeof window["cpActivateIgnoringOtherApps"] === "function")
window.cpActivateIgnoringOtherApps(!!shouldIgnoreOtherApps);
#endif
}
@end