mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Bug 600901 - [clang]: cannot initialize a parameter/variable in nsCocoaWindow.mm, r=josh, a=josh
This commit is contained in:
parent
4ce87fdf34
commit
7cade91cc0
@ -135,7 +135,11 @@ typedef struct _nsCocoaWindowList {
|
||||
|
||||
@end
|
||||
|
||||
#if defined( MAC_OS_X_VERSION_10_6 ) && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 )
|
||||
@interface WindowDelegate : NSObject <NSWindowDelegate>
|
||||
#else
|
||||
@interface WindowDelegate : NSObject
|
||||
#endif
|
||||
{
|
||||
nsCocoaWindow* mGeckoWindow; // [WEAK] (we are owned by the window)
|
||||
// Used to avoid duplication when we send NS_ACTIVATE and
|
||||
|
@ -2282,8 +2282,9 @@ static const NSString* kStateShowsToolbarButton = @"showsToolbarButton";
|
||||
{
|
||||
BOOL stateChanged = ([self drawsContentsIntoWindowFrame] != aState);
|
||||
[super setDrawsContentsIntoWindowFrame:aState];
|
||||
if (stateChanged) {
|
||||
nsCocoaWindow *geckoWindow = [[self delegate] geckoWidget];
|
||||
if (stateChanged && [[self delegate] isKindOfClass:[WindowDelegate class]]) {
|
||||
WindowDelegate *windowDelegate = (WindowDelegate *)[self delegate];
|
||||
nsCocoaWindow *geckoWindow = [windowDelegate geckoWidget];
|
||||
if (geckoWindow) {
|
||||
// Re-layout our contents.
|
||||
geckoWindow->ReportSizeEvent();
|
||||
@ -2306,13 +2307,16 @@ static const NSString* kStateShowsToolbarButton = @"showsToolbarButton";
|
||||
|
||||
RollUpPopups();
|
||||
|
||||
nsCocoaWindow *geckoWindow = [[self delegate] geckoWidget];
|
||||
if (!geckoWindow)
|
||||
return;
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsGUIEvent guiEvent(PR_TRUE, NS_OS_TOOLBAR, geckoWindow);
|
||||
guiEvent.time = PR_IntervalNow();
|
||||
geckoWindow->DispatchEvent(&guiEvent, status);
|
||||
if ([[self delegate] isKindOfClass:[WindowDelegate class]]) {
|
||||
WindowDelegate *windowDelegate = (WindowDelegate *)[self delegate];
|
||||
nsCocoaWindow *geckoWindow = [windowDelegate geckoWidget];
|
||||
if (!geckoWindow)
|
||||
return;
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsGUIEvent guiEvent(PR_TRUE, NS_OS_TOOLBAR, geckoWindow);
|
||||
guiEvent.time = PR_IntervalNow();
|
||||
geckoWindow->DispatchEvent(&guiEvent, status);
|
||||
}
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user