mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1259065 - Don't constrain window position (only its size) when DPI-rescaling during a move. r=emk a=ritu
MozReview-Commit-ID: Dx8o4tFYBU3
This commit is contained in:
parent
e9497b735e
commit
4207c0244b
@ -6903,7 +6903,8 @@ nsWindow::OnDPIChanged(int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
height = h;
|
||||
}
|
||||
|
||||
// Limit the position & size, if it would overflow the destination screen
|
||||
// Limit the position (if not in the middle of a drag-move) & size,
|
||||
// if it would overflow the destination screen
|
||||
nsCOMPtr<nsIScreenManager> sm = do_GetService(sScreenManagerContractID);
|
||||
if (sm) {
|
||||
nsCOMPtr<nsIScreen> screen;
|
||||
@ -6911,8 +6912,10 @@ nsWindow::OnDPIChanged(int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
if (screen) {
|
||||
int32_t availLeft, availTop, availWidth, availHeight;
|
||||
screen->GetAvailRect(&availLeft, &availTop, &availWidth, &availHeight);
|
||||
x = std::max(x, availLeft);
|
||||
y = std::max(y, availTop);
|
||||
if (mResizeState != MOVING) {
|
||||
x = std::max(x, availLeft);
|
||||
y = std::max(y, availTop);
|
||||
}
|
||||
width = std::min(width, availWidth);
|
||||
height = std::min(height, availHeight);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user