mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-27 18:38:49 +00:00
don't make a modally run window the main window
This commit is contained in:
1 parent
b430e2ef65
commit
e78200838f
2 files changed
+26
-1
No files matched your search
@@ -507,7 +507,8 @@ CPRunContinuesResponse = -1002;
|
||||
var theWindow = aModalSession._window;
|
||||
|
||||
[theWindow center];
|
||||
[theWindow makeKeyAndOrderFront:self];
|
||||
[theWindow makeKeyWindow];
|
||||
[theWindow orderFront:self];
|
||||
|
||||
// [theWindow._bridge _obscureWindowsBelowModalWindow];
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
@import <AppKit/CPApplication.j>
|
||||
@import <AppKit/CPWindow.j>
|
||||
|
||||
@implementation CPApplicationTest : OJTestCase
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// This sets up the CPApp convenience variable, the unit tests fails
|
||||
// if this is not done, because the framework internally uses CPApp.
|
||||
[CPApplication sharedApplication]
|
||||
}
|
||||
|
||||
- (void)testRunModalForWindow
|
||||
{
|
||||
var aWindow = [[CPWindow alloc] init];
|
||||
[[CPApplication sharedApplication] runModalForWindow:aWindow];
|
||||
|
||||
[self assertTrue:[aWindow isKeyWindow] message:@"A window must be made key when it's run modally"];
|
||||
[self assertFalse:[aWindow isMainWindow] message:@"A window must not become the main window when it's run modally"];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user