mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1186384 - Consider device pixel scale on fullscreen transition window. r=jimm
This commit is contained in:
parent
5b5cf0acd0
commit
1143947892
@ -2994,8 +2994,16 @@ nsWindow::PrepareForFullscreenTransition(nsISupports** aData)
|
||||
{
|
||||
FullscreenTransitionInitData initData;
|
||||
nsCOMPtr<nsIScreen> screen = GetWidgetScreen();
|
||||
screen->GetRectDisplayPix(&initData.mBounds.x, &initData.mBounds.y,
|
||||
&initData.mBounds.width, &initData.mBounds.height);
|
||||
int32_t x, y, width, height;
|
||||
screen->GetRectDisplayPix(&x, &y, &width, &height);
|
||||
MOZ_ASSERT(BoundsUseDisplayPixels(),
|
||||
"Should only be called on top-level window");
|
||||
CSSToLayoutDeviceScale scale = GetDefaultScale();
|
||||
initData.mBounds.x = NSToIntRound(x * scale.scale);
|
||||
initData.mBounds.y = NSToIntRound(y * scale.scale);
|
||||
initData.mBounds.width = NSToIntRound(width * scale.scale);
|
||||
initData.mBounds.height = NSToIntRound(height * scale.scale);
|
||||
|
||||
// Create a semaphore for synchronizing the window handle which will
|
||||
// be created by the transition thread and used by the main thread for
|
||||
// posting the transition messages.
|
||||
|
Loading…
Reference in New Issue
Block a user