mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-07 17:38:02 +00:00
Added application activation.
Reviewed by me.
This commit is contained in:
1 parent
1691b6f07e
commit
6076185da7
3 files changed
+15
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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])
|
||||
|
||||
@@ -45,4 +45,12 @@
|
||||
window.cpTerminate();
|
||||
}
|
||||
|
||||
+ (void)activateIgnoringOtherApps:(BOOL)shouldIgnoreOtherApps
|
||||
{
|
||||
#if PLATFORM(DOM)
|
||||
if (typeof window["cpActivateIgnoringOtherApps"] === "function")
|
||||
window.cpActivateIgnoringOtherApps(!!shouldIgnoreOtherApps);
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user