diff --git a/mozilla-1508378.patch b/mozilla-1508378.patch new file mode 100644 index 0000000..127256e --- /dev/null +++ b/mozilla-1508378.patch @@ -0,0 +1,55 @@ +diff -up thunderbird-60.6.1/widget/gtk/WindowSurfaceWayland.cpp.1508378 thunderbird-60.6.1/widget/gtk/WindowSurfaceWayland.cpp +--- thunderbird-60.6.1/widget/gtk/WindowSurfaceWayland.cpp.1508378 2019-04-12 09:23:26.846503741 +0200 ++++ thunderbird-60.6.1/widget/gtk/WindowSurfaceWayland.cpp 2019-04-12 09:25:45.661937077 +0200 +@@ -567,6 +567,23 @@ static void WaylandBufferDelayCommitHand + } + } + ++void WindowSurfaceWayland::CalcRectScale(LayoutDeviceIntRect& aRect, int aScale) { ++ if (aRect.x & 0x1) { ++ aRect.width += 1; ++ } ++ aRect.x = aRect.x / aScale; ++ ++ if (aRect.y & 0x1) { ++ aRect.height += 1; ++ } ++ aRect.y = aRect.y / aScale; ++ ++ aRect.width = (aRect.width & 0x1) ? aRect.width / aScale + 1 : ++ aRect.width / aScale; ++ aRect.height = (aRect.height & 0x1) ? aRect.height / aScale + 1 : ++ aRect.height / aScale; ++} ++ + void WindowSurfaceWayland::CommitWaylandBuffer() { + MOZ_ASSERT(mPendingCommit, "Committing empty surface!"); + +@@ -617,11 +634,13 @@ void WindowSurfaceWayland::CommitWayland + gint scaleFactor = mWindow->GdkScaleFactor(); + for (auto iter = mWaylandBufferDamage.RectIter(); !iter.Done(); + iter.Next()) { +- const mozilla::LayoutDeviceIntRect& r = iter.Get(); ++ mozilla::LayoutDeviceIntRect r = iter.Get(); + // We need to remove the scale factor because the wl_surface_damage + // also multiplies by current scale factor. +- wl_surface_damage(waylandSurface, r.x / scaleFactor, r.y / scaleFactor, +- r.width / scaleFactor, r.height / scaleFactor); ++ if (scaleFactor > 1) { ++ CalcRectScale(r, scaleFactor); ++ } ++ wl_surface_damage(waylandSurface, r.x, r.y, r.width, r.height); + } + } + +diff -up thunderbird-60.6.1/widget/gtk/WindowSurfaceWayland.h.1508378 thunderbird-60.6.1/widget/gtk/WindowSurfaceWayland.h +--- thunderbird-60.6.1/widget/gtk/WindowSurfaceWayland.h.1508378 2019-04-12 09:23:26.817503860 +0200 ++++ thunderbird-60.6.1/widget/gtk/WindowSurfaceWayland.h 2019-04-12 09:23:26.846503741 +0200 +@@ -101,6 +101,7 @@ class WindowSurfaceWayland : public Wind + const gfx::IntSize& aLockSize); + bool CommitImageSurfaceToWaylandBuffer(const LayoutDeviceIntRegion& aRegion); + void CommitWaylandBuffer(); ++ void CalcRectScale(LayoutDeviceIntRect& aRect, int scale); + + // TODO: Do we need to hold a reference to nsWindow object? + nsWindow* mWindow; diff --git a/thunderbird.spec b/thunderbird.spec index eb393bb..e6155bc 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -89,7 +89,7 @@ ExcludeArch: s390x Summary: Mozilla Thunderbird mail/newsgroup client Name: thunderbird Version: 60.6.1 -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.mozilla.org/projects/thunderbird/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -135,6 +135,7 @@ Patch312: mozilla-1522780.patch Patch400: mozilla-1526243.patch Patch401: mozilla-1540145.patch Patch402: mozilla-526293.patch +Patch403: mozilla-1508378.patch %if %{official_branding} # Required by Mozilla Corporation @@ -275,6 +276,7 @@ debug %{name}, you want to install %{name}-debuginfo instead. %patch400 -p1 -b .1526243 %patch401 -p1 -b .1540145 %patch402 -p1 -b .526293 +%patch403 -p1 -b .1508378 %if %{official_branding} # Required by Mozilla Corporation @@ -696,6 +698,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #=============================================================================== %changelog +* Fri Apr 12 2019 Martin Stransky - 60.6.1-4 +- Addef fix for mozbz#1508378 + * Wed Apr 3 2019 Martin Stransky - 60.6.1-3 - Added fixes for mozbz#1526243, mozbz#1540145, mozbz#526293