#27 Backport MR #2335 to fix scaling problems
Closed 2 years ago by jadahl. Opened 2 years ago by jdieter.
rpms/ jdieter/mutter rawhide  into  rawhide

Backport MR #2335 to fix scaling problems
Jonathan Dieter • 2 years ago  
file added
+27
@@ -0,0 +1,27 @@ 

+ diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c

+ index 3bbe82456..8deca4f29 100644

+ --- a/src/wayland/meta-wayland-surface.c

+ +++ b/src/wayland/meta-wayland-surface.c

+ @@ -791,12 +791,16 @@ meta_wayland_surface_apply_state (MetaWaylandSurface      *surface,

+    if ((get_buffer_width (surface) % surface->scale != 0) ||

+        (get_buffer_height (surface) % surface->scale != 0))

+      {

+ -      wl_resource_post_error (surface->resource, WL_SURFACE_ERROR_INVALID_SIZE,

+ -                              "Buffer size (%dx%d) must be an integer multiple "

+ -                              "of the buffer_scale (%d)",

+ -                              get_buffer_width (surface),

+ -                              get_buffer_height (surface), surface->scale);

+ -      goto cleanup;

+ +      struct wl_resource *resource = surface->resource;

+ +      pid_t pid;

+ +

+ +      wl_client_get_credentials (wl_resource_get_client (resource), &pid, NULL,

+ +                                 NULL);

+ +

+ +      g_warning ("Bug in client with pid %ld: Buffer size (%dx%d) is not an"

+ +                 "integer multiple of the buffer_scale (%d).", (long) pid,

+ +                 get_buffer_width (surface), get_buffer_height (surface),

+ +                 surface->scale);

+      }

+  

+    if (state->has_new_buffer_transform)

file modified
+10 -1
@@ -10,7 +10,7 @@ 

  

  Name:          mutter

  Version:       42.0

- Release:       5%{?dist}

+ Release:       6%{?dist}

  Summary:       Window and compositing manager based on Clutter

  

  License:       GPLv2+
@@ -63,6 +63,12 @@ 

  # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2366

  Patch10:       2366.patch

  

+ # Fix issues with display scaling

+ # https://gitlab.gnome.org/GNOME/mutter/-/issues/2083

+ # https://bugzilla.redhat.com/show_bug.cgi?id=2069984

+ # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2335

+ Patch11:       2335.patch

+ 

  BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.41.0

  BuildRequires: pkgconfig(sm)

  BuildRequires: pkgconfig(libwacom)
@@ -206,6 +212,9 @@ 

  %{_datadir}/mutter-%{mutter_api_version}/tests

  

  %changelog

+ * Thu Apr 21 2022 Jonathan Dieter <jdieter@gmail.com> - 42.0-6

+ - Backport MR #2335 to fix crash when scaling isn't 100%, 200% or 400%

+ 

  * Tue Apr 19 2022 Adam Williamson <awilliam@redhat.com> - 42.0-5

  - Backport MR #2366 to fix stuck modifier key issues (#2076390)

  - Backport MR #2321 to fix top bar hover issues

Currently, mutter crashes when display scaling isn't 100%, 200% or 400%. This PR includes upstream PR 2335, which fixes the problem.

I've built this in mock and installed on F36, and it fixes https://bugzilla.redhat.com/show_bug.cgi?id=2069984

This is since 42.1 no longer needed; closing.

Pull-Request has been closed by jadahl

2 years ago
Metadata