firefox/mozilla-1791856.patch
2022-09-30 10:28:39 +02:00

31 lines
1.5 KiB
Diff

diff -up firefox-105.0.1/widget/gtk/nsWindow.cpp.old firefox-105.0.1/widget/gtk/nsWindow.cpp
--- firefox-105.0.1/widget/gtk/nsWindow.cpp.old 2022-09-30 10:23:00.424784507 +0200
+++ firefox-105.0.1/widget/gtk/nsWindow.cpp 2022-09-30 10:24:36.345005046 +0200
@@ -1949,26 +1949,6 @@ void nsWindow::NativeMoveResizeWaylandPo
bool needsPositionUpdate = newBounds.TopLeft() != mBounds.TopLeft();
bool needsSizeUpdate = newBounds.Size() != mLastSizeRequest;
- if (needsPositionUpdate) {
- // See Bug 1735095
- // Font scale causes rounding errors which we can't handle by move-to-rect.
- // The font scale should not be used, but let's handle it somehow to
- // avoid endless move calls.
- if (StaticPrefs::layout_css_devPixelsPerPx() > 0 ||
- gfxPlatformGtk::GetFontScaleFactor() != 1) {
- bool roundingError = (abs(newBounds.x - mBounds.x) < 2 &&
- abs(newBounds.y - mBounds.y) < 2);
- if (roundingError) {
- // Keep the window where it is.
- GdkPoint topLeft = DevicePixelsToGdkPointRoundDown(mBounds.TopLeft());
- LOG(" apply rounding error workaround, move to %d, %d", topLeft.x,
- topLeft.y);
- gtk_window_move(GTK_WINDOW(mShell), topLeft.x, topLeft.y);
- needsPositionUpdate = false;
- }
- }
- }
-
if (needsSizeUpdate) {
// Wayland compositor changed popup size request from layout.
// Set the constraints to use them in nsMenuPopupFrame::SetPopupPosition().