mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 23:37:33 +09:00
Finish off PiP
This commit is contained in:
parent
aac2156499
commit
55a53a2576
14 changed files with 293 additions and 21 deletions
|
|
@ -259,6 +259,7 @@ public:
|
|||
NS_IMETHOD Move(double aX, double aY) override;
|
||||
virtual void SetSizeMode(nsSizeMode aMode) override;
|
||||
NS_IMETHOD HideWindowChrome(bool aShouldHide) override;
|
||||
void SetAlwaysOnTop(bool aAlwaysOnTop) override;
|
||||
|
||||
void EnteredFullScreen(bool aFullScreen, bool aNativeMode = true);
|
||||
virtual bool PrepareForFullscreenTransition(nsISupports** aData) override;
|
||||
|
|
|
|||
|
|
@ -1319,6 +1319,18 @@ nsCocoaWindow::SetSizeMode(nsSizeMode aMode)
|
|||
// This has to preserve the window's frame bounds.
|
||||
// This method requires (as does the Windows impl.) that you call Resize shortly
|
||||
// after calling HideWindowChrome. See bug 498835 for fixing this.
|
||||
void nsCocoaWindow::SetAlwaysOnTop(bool aAlwaysOnTop)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
nsBaseWidget::SetAlwaysOnTop(aAlwaysOnTop);
|
||||
if (mWindow && (mWindowType == eWindowType_toplevel ||
|
||||
mWindowType == eWindowType_dialog)) {
|
||||
[mWindow setLevel:aAlwaysOnTop ? NSFloatingWindowLevel : NSNormalWindowLevel];
|
||||
[mWindow setHidesOnDeactivate:NO];
|
||||
}
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCocoaWindow::HideWindowChrome(bool aShouldHide)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||
|
|
@ -1353,6 +1365,9 @@ NS_IMETHODIMP nsCocoaWindow::HideWindowChrome(bool aShouldHide)
|
|||
|
||||
// Re-import state.
|
||||
[mWindow importState:state];
|
||||
if (mAlwaysOnTop) {
|
||||
SetAlwaysOnTop(true);
|
||||
}
|
||||
|
||||
// Reparent the content view.
|
||||
[mWindow setContentView:contentView];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue