mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 544242 - implement sizemode_fullscreen on qt. r=stuart
This commit is contained in:
parent
635a29b33d
commit
f8474963f9
@ -482,14 +482,13 @@ nsWindow::SetSizeMode(PRInt32 aMode)
|
||||
case nsSizeMode_Minimized:
|
||||
mWidget->showMinimized();
|
||||
break;
|
||||
case nsSizeMode_Fullscreen:
|
||||
mWidget->showFullScreen();
|
||||
break;
|
||||
|
||||
default:
|
||||
// nsSizeMode_Normal, really.
|
||||
mWidget->showNormal ();
|
||||
// KILLME
|
||||
//if (mSizeState == nsSizeMode_Minimized)
|
||||
// gtk_window_deiconify(GTK_WINDOW(mWidget));
|
||||
//else if (mSizeState == nsSizeMode_Maximized)
|
||||
// gtk_window_unmaximize(GTK_WINDOW(mWidget));
|
||||
mWidget->showNormal();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1832,7 +1831,32 @@ void nsWindow::QWidgetDestroyed()
|
||||
NS_IMETHODIMP
|
||||
nsWindow::MakeFullScreen(PRBool aFullScreen)
|
||||
{
|
||||
return nsBaseWidget::MakeFullScreen(aFullScreen);
|
||||
if (aFullScreen) {
|
||||
if (mSizeMode != nsSizeMode_Fullscreen)
|
||||
mLastSizeMode = mSizeMode;
|
||||
|
||||
mSizeMode = nsSizeMode_Fullscreen;
|
||||
mWidget->showFullScreen();
|
||||
}
|
||||
else {
|
||||
mSizeMode = mLastSizeMode;
|
||||
|
||||
switch (mSizeMode) {
|
||||
case nsSizeMode_Maximized:
|
||||
mWidget->showMaximized();
|
||||
break;
|
||||
case nsSizeMode_Minimized:
|
||||
mWidget->showMinimized();
|
||||
break;
|
||||
case nsSizeMode_Normal:
|
||||
mWidget->showNormal();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
NS_ASSERTION(mLastSizeMode != nsSizeMode_Fullscreen,
|
||||
"mLastSizeMode should never be fullscreen");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -230,6 +230,10 @@ protected:
|
||||
// shouldn't be automatically set to 0,0 for first show.
|
||||
PRBool mPlaced;
|
||||
|
||||
// Remember the last sizemode so that we can restore it when
|
||||
// leaving fullscreen
|
||||
nsSizeMode mLastSizeMode;
|
||||
|
||||
/**
|
||||
* Event handlers (proxied from the actual qwidget).
|
||||
* They follow normal Qt widget semantics.
|
||||
|
Loading…
Reference in New Issue
Block a user