зеркало из https://github.com/mozilla/pjs.git
Bug 512575 - Switching out of fullscreen mode and alt-tabbing puts me back in fullscreen mode. r=dholbert
This commit is contained in:
Родитель
d755006a87
Коммит
93b62f413a
|
@ -383,6 +383,8 @@ nsWindow::nsWindow()
|
||||||
mTransientParent = nsnull;
|
mTransientParent = nsnull;
|
||||||
mWindowType = eWindowType_child;
|
mWindowType = eWindowType_child;
|
||||||
mSizeState = nsSizeMode_Normal;
|
mSizeState = nsSizeMode_Normal;
|
||||||
|
mLastSizeMode = nsSizeMode_Normal;
|
||||||
|
|
||||||
#ifdef MOZ_X11
|
#ifdef MOZ_X11
|
||||||
mOldFocusWindow = 0;
|
mOldFocusWindow = 0;
|
||||||
#endif /* MOZ_X11 */
|
#endif /* MOZ_X11 */
|
||||||
|
@ -5001,11 +5003,19 @@ nsWindow::MakeFullScreen(PRBool aFullScreen)
|
||||||
|
|
||||||
#if GTK_CHECK_VERSION(2,2,0)
|
#if GTK_CHECK_VERSION(2,2,0)
|
||||||
if (aFullScreen) {
|
if (aFullScreen) {
|
||||||
|
if (mSizeMode != nsSizeMode_Fullscreen)
|
||||||
|
mLastSizeMode = mSizeMode;
|
||||||
|
|
||||||
mSizeMode = nsSizeMode_Fullscreen;
|
mSizeMode = nsSizeMode_Fullscreen;
|
||||||
gdk_window_fullscreen (mShell->window);
|
gdk_window_fullscreen (mShell->window);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
|
mSizeMode = mLastSizeMode;
|
||||||
gdk_window_unfullscreen (mShell->window);
|
gdk_window_unfullscreen (mShell->window);
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_ASSERTION(mLastSizeMode != nsSizeMode_Fullscreen,
|
||||||
|
"mLastSizeMode should never be fullscreen");
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
#else
|
#else
|
||||||
return nsBaseWidget::MakeFullScreen(aFullScreen);
|
return nsBaseWidget::MakeFullScreen(aFullScreen);
|
||||||
|
|
|
@ -530,6 +530,10 @@ private:
|
||||||
nsCOMPtr<nsITimer> mDragLeaveTimer;
|
nsCOMPtr<nsITimer> mDragLeaveTimer;
|
||||||
float mLastMotionPressure;
|
float mLastMotionPressure;
|
||||||
|
|
||||||
|
// Remember the last sizemode so that we can restore it when
|
||||||
|
// leaving fullscreen
|
||||||
|
nsSizeMode mLastSizeMode;
|
||||||
|
|
||||||
static PRBool sIsDraggingOutOf;
|
static PRBool sIsDraggingOutOf;
|
||||||
// drag in progress
|
// drag in progress
|
||||||
static PRBool DragInProgress(void);
|
static PRBool DragInProgress(void);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче