mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 942913 - Make sheets return YES from isVisibleOrBeingShown while the sheet opening animation runs so that we don't refuse to composite them during the animation. r=smichaud
This commit is contained in:
parent
d1a6a51f41
commit
8d3c70c826
@ -97,6 +97,7 @@ typedef struct _nsCocoaWindowList {
|
||||
- (void)updateTrackingArea;
|
||||
- (NSView*)trackingAreaView;
|
||||
|
||||
- (void)setBeingShown:(BOOL)aValue;
|
||||
- (BOOL)isVisibleOrBeingShown;
|
||||
|
||||
- (ChildView*)mainChildView;
|
||||
|
@ -35,7 +35,6 @@
|
||||
#include "gfxPlatform.h"
|
||||
#include "qcms.h"
|
||||
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/BasicEvents.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include <algorithm>
|
||||
@ -693,6 +692,8 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool bState)
|
||||
if (!mSheetNeedsShow && !bState && ![mWindow isVisible])
|
||||
return NS_OK;
|
||||
|
||||
[mWindow setBeingShown:bState];
|
||||
|
||||
nsIWidget* parentWidget = mParent;
|
||||
nsCOMPtr<nsPIWidgetCocoa> piParentWidget(do_QueryInterface(parentWidget));
|
||||
NSWindow* nativeParentWindow = (parentWidget) ?
|
||||
@ -912,6 +913,8 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool bState)
|
||||
if (mPopupContentView)
|
||||
mPopupContentView->Show(bState);
|
||||
|
||||
[mWindow setBeingShown:NO];
|
||||
|
||||
return NS_OK;
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
||||
@ -2632,25 +2635,16 @@ static NSMutableSet *gSwizzledFrameViewClasses = nil;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setBeingShown:(BOOL)aValue
|
||||
{
|
||||
mBeingShown = aValue;
|
||||
}
|
||||
|
||||
- (BOOL)isVisibleOrBeingShown
|
||||
{
|
||||
return [super isVisible] || mBeingShown;
|
||||
}
|
||||
|
||||
- (void)orderFront:(id)sender
|
||||
{
|
||||
AutoRestore<BOOL> saveBeingShown(mBeingShown);
|
||||
mBeingShown = YES;
|
||||
[super orderFront:sender];
|
||||
}
|
||||
|
||||
- (void)makeKeyAndOrderFront:(id)sender
|
||||
{
|
||||
AutoRestore<BOOL> saveBeingShown(mBeingShown);
|
||||
mBeingShown = YES;
|
||||
[super makeKeyAndOrderFront:sender];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[mActiveTitlebarColor release];
|
||||
|
Loading…
Reference in New Issue
Block a user