Change for the way in which we detect full bridge window close

This commit is contained in:
Ross Boucher committed 2009-12-02 18:26:55 -08:00
1 parent a0ee2f384b
commit 3002acc895
1 file changed
+11 -3
+11 -3
View File
@@ -1678,6 +1678,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:)])
{
@@ -1738,9 +1749,6 @@ CPTexturedBackgroundWindowMask
[[CPNotificationCenter defaultCenter] postNotificationName:CPWindowWillCloseNotification object:self];
[self orderOut:nil];
if ([self isFullBridge])
[[self platformWindow] _propagateCurrentDOMEvent:YES];
}
// Managing Main Status