mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1160014 part 3 - Backout code from bug 634586. r=jimm
The code was for improving fullscreen transition. However, it doesn't seem to be an improvment anymore. Instead, it causes various bugs like bug 649067, bug 646374, bug 1053783. Also see bug 634586 comment 33 which shows that this code causes performance issue on slow machine. According to my test, removing this code could improve the speed switching to fullscreen from normal mode. --HG-- extra : source : bc1aca3cb33b6692620f676233ae51402df159b4
This commit is contained in:
parent
68dd069739
commit
1bc3349587
@ -2875,26 +2875,16 @@ nsWindow::MakeFullScreen(bool aFullScreen, nsIScreen* aTargetScreen)
|
|||||||
// If we are going fullscreen, the window size continues to change
|
// If we are going fullscreen, the window size continues to change
|
||||||
// and the window will be reflow again then.
|
// and the window will be reflow again then.
|
||||||
UpdateNonClientMargins(mSizeMode, /* Reflow */ !aFullScreen);
|
UpdateNonClientMargins(mSizeMode, /* Reflow */ !aFullScreen);
|
||||||
|
|
||||||
bool visible = mIsVisible;
|
|
||||||
if (mOldSizeMode == nsSizeMode_Normal)
|
|
||||||
Show(false);
|
|
||||||
|
|
||||||
// Will call hide chrome, reposition window. Note this will
|
// Will call hide chrome, reposition window. Note this will
|
||||||
// also cache dimensions for restoration, so it should only
|
// also cache dimensions for restoration, so it should only
|
||||||
// be called once per fullscreen request.
|
// be called once per fullscreen request.
|
||||||
nsresult rv = nsBaseWidget::MakeFullScreen(aFullScreen, aTargetScreen);
|
nsresult rv = nsBaseWidget::MakeFullScreen(aFullScreen, aTargetScreen);
|
||||||
|
|
||||||
if (visible) {
|
if (mIsVisible && !aFullScreen && mOldSizeMode == nsSizeMode_Normal) {
|
||||||
Show(true);
|
// Ensure the window exiting fullscreen get activated. Window
|
||||||
Invalidate();
|
// activation might be bypassed in SetSizeMode.
|
||||||
|
DispatchFocusToTopLevelWindow(true);
|
||||||
if (!aFullScreen && mOldSizeMode == nsSizeMode_Normal) {
|
|
||||||
// Ensure the window exiting fullscreen get activated. Window
|
|
||||||
// activation was bypassed by SetSizeMode, and hiding window for
|
|
||||||
// transition could also blur the current window.
|
|
||||||
DispatchFocusToTopLevelWindow(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify the taskbar that we have exited full screen mode.
|
// Notify the taskbar that we have exited full screen mode.
|
||||||
|
Loading…
Reference in New Issue
Block a user