diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index ea5c7b244..1670ad852 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -1685,6 +1685,17 @@ CPTexturedBackgroundWindowMask if (!(_styleMask & CPClosableWindowMask)) return; + if ([self isFullBridge]) + { + var event = [CPApp currentEvent]; + + if ([event type] === CPKeyDown && [event characters] === "w" && ([event modifierFlags] & CPPlatformActionKeyMask)) + { + [[self platformWindow] _propagateCurrentDOMEvent:YES]; + return; + } + } + // Only send ONE windowShouldClose: message. if ([_delegate respondsToSelector:@selector(windowShouldClose:)]) { @@ -1745,9 +1756,6 @@ CPTexturedBackgroundWindowMask [[CPNotificationCenter defaultCenter] postNotificationName:CPWindowWillCloseNotification object:self]; [self orderOut:nil]; - - if ([self isFullBridge]) - [[self platformWindow] _propagateCurrentDOMEvent:YES]; } // Managing Main Status diff --git a/AppKit/CPWindow/_CPHUDWindowView.j b/AppKit/CPWindow/_CPHUDWindowView.j index 49a850fd0..ad0efd630 100644 --- a/AppKit/CPWindow/_CPHUDWindowView.j +++ b/AppKit/CPWindow/_CPHUDWindowView.j @@ -48,7 +48,7 @@ var HUD_TITLEBAR_HEIGHT = 26.0; [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPWindow/HUD/CPWindowHUDBackground2.png"] size:CPSizeMake(6.0, 78.0)], [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPWindow/HUD/CPWindowHUDBackground3.png"] size:CPSizeMake(6.0, 1.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPWindow/HUD/CPWindowHUDBackground4.png"] size:CPSizeMake(1.0, 1.0)], + [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPWindow/HUD/CPWindowHUDBackground4.png"] size:CPSizeMake(5.0, 5.0)], [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPWindow/HUD/CPWindowHUDBackground5.png"] size:CPSizeMake(6.0, 1.0)], [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPWindow/HUD/CPWindowHUDBackground6.png"] size:CPSizeMake(6.0, 6.0)], diff --git a/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground4.png b/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground4.png index 83d23053f..4d450f53a 100644 Binary files a/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground4.png and b/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground4.png differ diff --git a/Foundation/CPArray.j b/Foundation/CPArray.j index 6f17532a9..66b6a266f 100755 --- a/Foundation/CPArray.j +++ b/Foundation/CPArray.j @@ -521,8 +521,8 @@ */ - (id)objectAtIndex:(int)anIndex { - if (anIndex >= length) - [CPException raise:CPRangeException reason:@"index (" + anIndex + @") beyond bounds (" + length + @")"]; + if (anIndex >= length || anIndex < 0) + [CPException raise:CPRangeException reason:@"index (" + anIndex + @") out of bounds (0 - " + length + @")"]; return self[anIndex]; }