diff --git a/0001-window-actor-Special-case-shaped-Java-windows.patch b/0001-window-actor-Special-case-shaped-Java-windows.patch deleted file mode 100644 index 36d50b6c347b0fa48781ce3aff070cfc81c7c222..0000000000000000000000000000000000000000 --- a/0001-window-actor-Special-case-shaped-Java-windows.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9efcc35102b4c41265e93461b35a1193b3d5822d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Fri, 12 May 2017 13:40:31 +0200 -Subject: [PATCH] window-actor: Special-case shaped Java windows - -OpenJDK wrongly assumes that shaping a window implies no shadows. -They got lucky until commit b975676c changed the fallback case, -but now their compliance tests are broken. Make them happy again -by special-casing shaped Java windows. ---- - src/compositor/meta-window-actor-x11.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c -index b7032e0ba..b05d5e158 100644 ---- a/src/compositor/meta-window-actor-x11.c -+++ b/src/compositor/meta-window-actor-x11.c -@@ -528,6 +528,14 @@ has_shadow (MetaWindowActorX11 *actor_x11) - */ - if (window->has_custom_frame_extents) - return FALSE; -+ -+ /* -+ * OpenJDK wrongly assumes that shaping a window implies no compositor -+ * shadows; make its compliance tests happy to give it what it wants ... -+ */ -+ if (g_strcmp0 (window->res_name, "sun-awt-X11-XWindowPeer") == 0 && -+ window->shape_region != NULL) -+ return FALSE; - - /* - * Generate shadows for all other windows. --- -2.23.0 - diff --git a/backport-Add-IS_ALIVE-to-get_property.patch b/backport-Add-IS_ALIVE-to-get_property.patch deleted file mode 100644 index 2773fa7b9238895d43485a2d482c236c0b27fe41..0000000000000000000000000000000000000000 --- a/backport-Add-IS_ALIVE-to-get_property.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 558b799998957a31a7c364e1bf0c30903f68c44a Mon Sep 17 00:00:00 2001 -From: Sebastian Keller -Date: Tue, 7 Nov 2023 01:02:55 +0100 -Subject: [PATCH] window: Add IS_ALIVE to get_property - -This was causing looking glass to wrongly claim that is_alive = false -for all windows. - -Part-of: - -(cherry picked from commit 0807579cdd06186c119603836c828e93778e3009) ---- - src/core/window.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/core/window.c b/src/core/window.c -index 09e911ae53..91adc03e98 100644 ---- a/src/core/window.c -+++ b/src/core/window.c -@@ -426,6 +426,9 @@ meta_window_get_property(GObject *object, - case PROP_ON_ALL_WORKSPACES: - g_value_set_boolean (value, win->on_all_workspaces); - break; -+ case PROP_IS_ALIVE: -+ g_value_set_boolean (value, win->is_alive); -+ break; - case PROP_DISPLAY: - g_value_set_object (value, win->display); - break; diff --git a/backport-Add-an-allocation-check-to-calculate_clear_area.patch b/backport-Add-an-allocation-check-to-calculate_clear_area.patch deleted file mode 100644 index c322f6db0698c359500fec59b76e14320fc33266..0000000000000000000000000000000000000000 --- a/backport-Add-an-allocation-check-to-calculate_clear_area.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 140471fd9ca2bff588ba0d5f89ce34857e934c0a Mon Sep 17 00:00:00 2001 -From: Ivan Molodetskikh -Date: Tue, 28 Nov 2023 08:35:50 +0400 -Subject: [PATCH] clutter/pick-stack: Add an allocation check to - calculate_clear_area () - -We might pick an actor that needs relayout. I've seen this happen inside -hiding / unmapping in particular. In this case, calculate_clear_area () -will call clutter_actor_get_abs_allocation_vertices () which in turn -will force a relayout. However, this is not what we want, because: - -1. We don't want to run layout during picking. -2. If the actor needs an allocation, then the pick stack could not have - used an up-to-date allocation, because it is not computed. Therefore - this clear area would use a potentially completely different - allocation than the one stored in the pick stack. - -Thankfully, clear area seems to be used as a cache/optimization, so -let's just avoid computing it if the actor is not allocated. - -Part-of: - -(cherry picked from commit edbc9a20863fd226e377787f4e75c32d2e359399) ---- - clutter/clutter/clutter-pick-stack.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/clutter/clutter/clutter-pick-stack.c b/clutter/clutter/clutter-pick-stack.c -index e11d2489c0..704b8c4058 100644 ---- a/clutter/clutter/clutter-pick-stack.c -+++ b/clutter/clutter/clutter-pick-stack.c -@@ -462,6 +462,13 @@ calculate_clear_area (ClutterPickStack *pick_stack, - cairo_rectangle_int_t rect; - int i; - -+ if (!clutter_actor_has_allocation (pick_rec->actor)) -+ { -+ if (clear_area) -+ *clear_area = NULL; -+ return; -+ } -+ - clutter_actor_get_abs_allocation_vertices (pick_rec->actor, - (graphene_point3d_t *) &verts); - if (!get_verts_rectangle (verts, &rect)) diff --git a/backport-Do-not-write-uninitialized-out-values-on-failed-transform.patch b/backport-Do-not-write-uninitialized-out-values-on-failed-transform.patch deleted file mode 100644 index cea0719eb2caf62839592b4a6ae00bb2a3cef56b..0000000000000000000000000000000000000000 --- a/backport-Do-not-write-uninitialized-out-values-on-failed-transform.patch +++ /dev/null @@ -1,44 +0,0 @@ -From fa10ce76db0da6ba812badcbfefc007fb08c400c Mon Sep 17 00:00:00 2001 -From: Sebastian Keller -Date: Fri, 15 Dec 2023 00:47:34 +0100 -Subject: [PATCH] clutter/actor: Don't write uninitialized out values on failed - transform - -clutter_actor_get_transformed_position() would write the uninitialized -values of v2 when clutter_actor_apply_transform_to_point() fails in -_clutter_actor_fully_transform_vertices() because the actor has not been -added to the stage yet. - -When called from JS this would overwrite the zero initialized values -passed in from gjs. If the uninitialized values now happen to correspond -to one of the NaN float values used by mozjs to represent a pointer -type, this would lead to seemingly random crashes in mozjs code later -on. - -Avoid this by using _clutter_actor_fully_transform_vertices() directly, -which allows us to check if it failed. - -Related: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/469 -Related: https://gitlab.gnome.org/GNOME/gjs/-/issues/591 -Part-of: - -(cherry picked from commit c86d8a23c3464f75b976af915f0926b5dfc10241) ---- - clutter/clutter/clutter-actor.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c -index cac1da4dee..0e87cc8734 100644 ---- a/clutter/clutter/clutter-actor.c -+++ b/clutter/clutter/clutter-actor.c -@@ -9668,7 +9668,9 @@ clutter_actor_get_transformed_position (ClutterActor *self, - graphene_point3d_t v2; - - v1.x = v1.y = v1.z = 0; -- clutter_actor_apply_transform_to_point (self, &v1, &v2); -+ -+ if (!_clutter_actor_fully_transform_vertices (self, &v1, &v2, 1)) -+ return; - - if (x) - *x = v2.x; diff --git a/backport-Do-not-wrongly-set-window-as-not-alive-when-pings-are-disabled.patch b/backport-Do-not-wrongly-set-window-as-not-alive-when-pings-are-disabled.patch deleted file mode 100644 index 804d60ff09b2c2257fbacc63eab29eb4cd7af01c..0000000000000000000000000000000000000000 --- a/backport-Do-not-wrongly-set-window-as-not-alive-when-pings-are-disabled.patch +++ /dev/null @@ -1,44 +0,0 @@ -From eee5eab85b54c5337dc7a2940fdda922655c49a7 Mon Sep 17 00:00:00 2001 -From: Sebastian Keller -Date: Tue, 7 Nov 2023 00:23:19 +0100 -Subject: [PATCH] delete: Don't wrongly set window as not alive when pings are - disabled - -meta_display_ping_window() does nothing when check-alive-timeout is set -to 0, but meta_window_check_alive_on_event() was relying on it to reset -the events_during_ping. Without this events_during_ping was just -counting up until the threshold was reached and the window was marked as -not alive, preventing further pointer events from being sent to the -window. - -Fix this by not doing anything in meta_window_check_alive_on_event() if -check-alive-timeout is 0, similar to meta_display_ping_window(). - -Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3142 -Part-of: - -(cherry picked from commit d978ab189012317f64dbc8f519393bb1456d9ba5) ---- - src/core/delete.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/core/delete.c b/src/core/delete.c -index 1270ea0899..888bf18620 100644 ---- a/src/core/delete.c -+++ b/src/core/delete.c -@@ -96,9 +96,15 @@ void - meta_window_check_alive_on_event (MetaWindow *window, - uint32_t timestamp) - { -+ unsigned int check_alive_timeout; -+ - if (!meta_window_can_ping (window)) - return; - -+ check_alive_timeout = meta_prefs_get_check_alive_timeout (); -+ if (check_alive_timeout == 0) -+ return; -+ - meta_display_ping_window (window, timestamp); - - window->events_during_ping++; diff --git a/backport-Propagate-focus-appearance-to-all-ancestors.patch b/backport-Propagate-focus-appearance-to-all-ancestors.patch deleted file mode 100644 index eb79bc34ba92513b41b40f4c652fda95ddde4ac8..0000000000000000000000000000000000000000 --- a/backport-Propagate-focus-appearance-to-all-ancestors.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 18640069a418377a420f752b17e4883cb2cca22c Mon Sep 17 00:00:00 2001 -From: Sebastian Wick -Date: Mon, 30 Oct 2023 13:57:17 +0100 -Subject: [PATCH] core/window: Propagate focus appearance to all ancestors - -The loop in meta_window_propagate_focus_appearance breaks if any -ancestor has attached_focus_window == focus_window but further ancestors -might still have a different attached_focus_window. - -Continue the loop until the root ancestor instead. - -Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2913 -Part-of: - -(cherry picked from commit 4e088cac0e64f58967cca2365287f1edf2680128) ---- - src/core/window.c | 10 +++------- - 1 file changed, 3 insertions(+), 7 deletions(-) - -diff --git a/src/core/window.c b/src/core/window.c -index 91adc03e98..80b47fe754 100644 ---- a/src/core/window.c -+++ b/src/core/window.c -@@ -5178,19 +5178,15 @@ meta_window_propagate_focus_appearance (MetaWindow *window, - parent = meta_window_get_transient_for (child); - while (parent && (!focused || should_propagate_focus_appearance (child))) - { -- gboolean child_focus_state_changed; -+ gboolean child_focus_state_changed = FALSE; - -- if (focused) -+ if (focused && parent->attached_focus_window != focus_window) - { -- if (parent->attached_focus_window == focus_window) -- break; - child_focus_state_changed = (parent->attached_focus_window == NULL); - parent->attached_focus_window = focus_window; - } -- else -+ else if (parent->attached_focus_window == focus_window) - { -- if (parent->attached_focus_window != focus_window) -- break; - child_focus_state_changed = (parent->attached_focus_window != NULL); - parent->attached_focus_window = NULL; - } diff --git a/backport-backends-Attempt-a-fallback-to-default-cursor-on-failed.patch b/backport-backends-Attempt-a-fallback-to-default-cursor-on-failed.patch deleted file mode 100644 index 787715692629cc6aadfe8a5e6f3abfd503e5abb6..0000000000000000000000000000000000000000 --- a/backport-backends-Attempt-a-fallback-to-default-cursor-on-failed.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 9f89421ef5abfe5143a777aa33eee308e81a7055 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Tue, 3 Oct 2023 13:54:38 +0200 -Subject: [PATCH] backends: Attempt a fallback to 'default' cursor on failed - lookups - -While we should ideally have a sensible cursor theme, handle the -case of cursor themes that lack certain cursor names, and fallback -to the 'default' cursor in those cases. - -The 'grey rectangle' fallback is still left, in case we even fail -to load a 'default' cursor. - -Part-of: ---- - src/backends/meta-cursor-sprite-xcursor.c | 19 ++++++++++++------- - 1 file changed, 12 insertions(+), 7 deletions(-) - -diff --git a/src/backends/meta-cursor-sprite-xcursor.c b/src/backends/meta-cursor-sprite-xcursor.c -index 4794b89f0d6..42d1884a611 100644 ---- a/src/backends/meta-cursor-sprite-xcursor.c -+++ b/src/backends/meta-cursor-sprite-xcursor.c -@@ -157,17 +157,22 @@ static XcursorImages * - load_cursor_on_client (MetaCursor cursor, int scale) - { - XcursorImages *xcursor_images; -- int fallback_size; -+ int fallback_size, i; -+ /* Set a 'default' fallback */ -+ MetaCursor cursors[] = { cursor, META_CURSOR_DEFAULT }; - - if (cursor == META_CURSOR_BLANK) - return create_blank_cursor_images (); - -- xcursor_images = -- XcursorLibraryLoadImages (translate_meta_cursor (cursor), -- meta_prefs_get_cursor_theme (), -- meta_prefs_get_cursor_size () * scale); -- if (xcursor_images) -- return xcursor_images; -+ for (i = 0; i < G_N_ELEMENTS (cursors); i++) -+ { -+ xcursor_images = -+ XcursorLibraryLoadImages (translate_meta_cursor (cursors[i]), -+ meta_prefs_get_cursor_theme (), -+ meta_prefs_get_cursor_size () * scale); -+ if (xcursor_images) -+ return xcursor_images; -+ } - - g_warning_once ("No cursor theme available, please install a cursor theme"); - --- -GitLab - diff --git a/backport-backends-Use-standard-cursor-names-from-the-CSS.patch b/backport-backends-Use-standard-cursor-names-from-the-CSS.patch deleted file mode 100644 index 02c1e9508e629590d3d2e0ac61704a7b71a8e5e2..0000000000000000000000000000000000000000 --- a/backport-backends-Use-standard-cursor-names-from-the-CSS.patch +++ /dev/null @@ -1,82 +0,0 @@ -From d970c9db1abdb0e1f26aeff43518265471ba303b Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Fri, 22 Sep 2023 18:06:31 +0200 -Subject: [PATCH] backends: Use standard cursor names from the CSS - specification - -This is the preferred name set, and handled by adwaita icon theme. -Use the names from https://www.w3.org/TR/css-ui-4/#cursor, like -GDK does at https://docs.gtk.org/gdk4/ctor.Cursor.new_from_name.html. - -Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3040 -Part-of: ---- - src/backends/meta-cursor-sprite-xcursor.c | 34 +++++++++++------------ - 1 file changed, 17 insertions(+), 17 deletions(-) - -diff --git a/src/backends/meta-cursor-sprite-xcursor.c b/src/backends/meta-cursor-sprite-xcursor.c -index 1ad444c065f..4794b89f0d6 100644 ---- a/src/backends/meta-cursor-sprite-xcursor.c -+++ b/src/backends/meta-cursor-sprite-xcursor.c -@@ -50,41 +50,41 @@ translate_meta_cursor (MetaCursor cursor) - switch (cursor) - { - case META_CURSOR_DEFAULT: -- return "left_ptr"; -+ return "default"; - case META_CURSOR_NORTH_RESIZE: -- return "top_side"; -+ return "n-resize"; - case META_CURSOR_SOUTH_RESIZE: -- return "bottom_side"; -+ return "s-resize"; - case META_CURSOR_WEST_RESIZE: -- return "left_side"; -+ return "w-resize"; - case META_CURSOR_EAST_RESIZE: -- return "right_side"; -+ return "e-resize"; - case META_CURSOR_SE_RESIZE: -- return "bottom_right_corner"; -+ return "se-resize"; - case META_CURSOR_SW_RESIZE: -- return "bottom_left_corner"; -+ return "sw-resize"; - case META_CURSOR_NE_RESIZE: -- return "top_right_corner"; -+ return "ne-resize"; - case META_CURSOR_NW_RESIZE: -- return "top_left_corner"; -+ return "nw-resize"; - case META_CURSOR_MOVE_OR_RESIZE_WINDOW: -- return "fleur"; -+ return "move"; - case META_CURSOR_BUSY: -- return "watch"; -+ return "wait"; - case META_CURSOR_DND_IN_DRAG: -- return "dnd-none"; -+ return "no-drop"; - case META_CURSOR_DND_MOVE: -- return "dnd-move"; -+ return "grabbing"; - case META_CURSOR_DND_COPY: -- return "dnd-copy"; -+ return "copy"; - case META_CURSOR_DND_UNSUPPORTED_TARGET: -- return "dnd-none"; -+ return "no-drop"; - case META_CURSOR_POINTING_HAND: -- return "hand2"; -+ return "pointer"; - case META_CURSOR_CROSSHAIR: - return "crosshair"; - case META_CURSOR_IBEAM: -- return "xterm"; -+ return "text"; - case META_CURSOR_BLANK: - case META_CURSOR_NONE: - case META_CURSOR_LAST: --- -GitLab - diff --git a/mutter-44.6.tar.xz b/mutter-44.6.tar.xz deleted file mode 100644 index 640f9d6ef51cfd7da49f41428f6dec39a6ee30fe..0000000000000000000000000000000000000000 Binary files a/mutter-44.6.tar.xz and /dev/null differ diff --git a/mutter-49.0.tar.xz b/mutter-49.0.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..62f53b44c1ad76d281713d40445f77619abfbaf1 Binary files /dev/null and b/mutter-49.0.tar.xz differ diff --git a/mutter.spec b/mutter.spec index bfe3248380828e69d97e1d273bfcf39bd4a6a72e..59936c0f87cee63fa06a981f794219e8a03f9c53 100644 --- a/mutter.spec +++ b/mutter.spec @@ -1,94 +1,111 @@ -%global glib_version 2.71.0 +%global glib_version 2.81.1 %global gtk3_version 3.19.8 -%global gsettings_desktop_schemas_version 40 -%global json_glib_version 0.12.0 -%global libinput_version 1.19.0 -%global pipewire_version 0.3.33 +%global gtk4_version 4.0.0 +%global gsettings_desktop_schemas_version 47~beta +%global libinput_version 1.26.0 +%global pipewire_version 1.2.0 %global lcms2_version 2.6 %global colord_version 1.4.5 -%global mutter_api_version 12 +%global mutter_api_version 17 +%global libei_version 1.3.901 Name: mutter -Version: 44.6 -Release: 5 +Version: 49.0 +Release: 1 Summary: Window and compositing manager based on Clutter -License: GPLv2+ +License: GPL-2.0-or-later URL: https://www.gnome.org -Source0: https://download.gnome.org/sources/%{name}/44/%{name}-%{version}.tar.xz - -Patch0: 0001-window-actor-Special-case-shaped-Java-windows.patch -Patch1: mutter-42.alpha-disable-tegra.patch -Patch2: backport-Do-not-wrongly-set-window-as-not-alive-when-pings-are-disabled.patch -Patch3: backport-Add-IS_ALIVE-to-get_property.patch -Patch4: backport-Propagate-focus-appearance-to-all-ancestors.patch -Patch5: backport-Do-not-write-uninitialized-out-values-on-failed-transform.patch -Patch6: backport-Add-an-allocation-check-to-calculate_clear_area.patch -Patch7: backport-backends-Use-standard-cursor-names-from-the-CSS.patch -Patch8: backport-backends-Attempt-a-fallback-to-default-cursor-on-failed.patch - -BuildRequires: meson pam-devel zenity sysprof-devel gtk-doc gettext-devel git-core -BuildRequires: xorg-x11-server-Xorg xorg-x11-server-Xvfb desktop-file-utils -BuildRequires: mesa-libEGL-devel mesa-libGLES-devel mesa-libGL-devel mesa-libgbm-devel -BuildRequires: pkgconfig(libpipewire-0.3) >= %{pipewire_version} -BuildRequires: pkgconfig(json-glib-1.0) >= %{json_glib_version} -BuildRequires: pkgconfig(libinput) >= %{libinput_version} -BuildRequires: pkgconfig(gsettings-desktop-schemas) >= %{gsettings_desktop_schemas_version} -BuildRequires: pkgconfig(lcms2) >= %{lcms2_version} -BuildRequires: pkgconfig(colord) >= %{colord_version} +Source0: https://download.gnome.org/sources/%{name}/%{version_major}/%{name}-%{version}.tar.xz + +Patch0: mutter-42.alpha-disable-tegra.patch +Patch1: window-drag-bug.patch + + BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.41.0 BuildRequires: pkgconfig(sm) +BuildRequires: pkgconfig(libadwaita-1) BuildRequires: pkgconfig(libwacom) -BuildRequires: pkgconfig(x11) -BuildRequires: pkgconfig(xdamage) -BuildRequires: pkgconfig(xext) -BuildRequires: pkgconfig(xfixes) -BuildRequires: pkgconfig(xi) -BuildRequires: pkgconfig(xrandr) -BuildRequires: pkgconfig(xrender) -BuildRequires: pkgconfig(xcursor) -BuildRequires: pkgconfig(xcomposite) -BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(xkbcommon) -BuildRequires: pkgconfig(xkbcommon-x11) -BuildRequires: pkgconfig(xkbfile) -BuildRequires: pkgconfig(xtst) +BuildRequires: mesa-libEGL-devel +BuildRequires: mesa-libGLES-devel +BuildRequires: mesa-libGL-devel +BuildRequires: mesa-libgbm-devel BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(graphene-gobject-1.0) +BuildRequires: pam-devel +BuildRequires: pkgconfig(libdisplay-info) +BuildRequires: pkgconfig(libpipewire-0.3) >= %{pipewire_version} BuildRequires: pkgconfig(sysprof-capture-4) +BuildRequires: sysprof-devel BuildRequires: pkgconfig(libsystemd) -BuildRequires: pkgconfig(xkeyboard-config) +BuildRequires: pkgconfig(umockdev-1.0) +BuildRequires: desktop-file-utils +BuildRequires: cvt +BuildRequires: python3-argcomplete +BuildRequires: python3-docutils +# Bootstrap requirements +BuildRequires: gettext-devel git-core BuildRequires: pkgconfig(libcanberra) +BuildRequires: pkgconfig(gsettings-desktop-schemas) >= %{gsettings_desktop_schemas_version} BuildRequires: pkgconfig(gnome-settings-daemon) +BuildRequires: meson BuildRequires: pkgconfig(gbm) -BuildRequires: pkgconfig(gnome-desktop-3.0) +BuildRequires: pkgconfig(glycin-2) +BuildRequires: pkgconfig(gnome-desktop-4) BuildRequires: pkgconfig(gudev-1.0) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libstartup-notification-1.0) -BuildRequires: pkgconfig(wayland-eglstream) BuildRequires: pkgconfig(wayland-protocols) BuildRequires: pkgconfig(wayland-server) -BuildRequires: xorg-x11-server +BuildRequires: pkgconfig(lcms2) >= %{lcms2_version} +BuildRequires: pkgconfig(colord) >= %{colord_version} +BuildRequires: pkgconfig(libei-1.0) >= %{libei_version} +BuildRequires: pkgconfig(libeis-1.0) >= %{libei_version} + +BuildRequires: pkgconfig(libinput) >= %{libinput_version} BuildRequires: pkgconfig(xwayland) -BuildRequires: chrpath - -Requires: gnome-control-center-filesystem +BuildRequires: pkgconfig(bash-completion) + +BuildRequires: python3-dbusmock + +Requires: control-center-filesystem Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas_version} Requires: gnome-settings-daemon -Requires: gtk3%{?_isa} >= %{gtk3_version} -Requires: json-glib%{?_isa} >= %{json_glib_version} +Requires: gtk4%{?_isa} >= %{gtk4_version} Requires: libinput%{?_isa} >= %{libinput_version} Requires: pipewire%{_isa} >= %{pipewire_version} Requires: startup-notification Requires: dbus -Requires: zenity +Requires: python3-argcomplete + Recommends: mesa-dri-drivers%{?_isa} + Provides: firstboot(windowmanager) = mutter +Provides: %{name}-help = %{version}-%{release} +Obsoletes: %{name}-help < %{version}-%{release} + +# Cogl and Clutter were forked at these versions, but have diverged +# significantly since then. Provides: bundled(cogl) = 1.22.0 Provides: bundled(clutter) = 1.26.0 +Conflicts: mutter < 45~beta.1-2 + +# Make sure dnf updates gnome-shell together with this package; otherwise we +# might end up with broken gnome-shell installations due to mutter ABI changes. +Conflicts: gnome-shell < 45~rc + %description -Mutter is a window and compositing manager based on Clutter, forked -from Metacity. +Mutter is a window and compositing manager that displays and manages +your desktop via OpenGL. Mutter combines a sophisticated display engine +using the Clutter toolkit with solid window-management logic inherited +from the Metacity window manager. + +While Mutter can be used stand-alone, it is primarily intended to be +used as the display core of a larger system such as GNOME Shell. For +this reason, Mutter is very extensible via plugins, which are used both +to add fancy visual effects and to rework the window management +behaviors to meet the needs of the environment. %package devel Summary: Development files and Header files for %{name} @@ -96,17 +113,16 @@ Requires: %{name} = %{version}-%{release} Requires: mesa-libEGL-devel Provides: %{name}-tests Obsoletes: %{name}-tests < %{version}-%{release} + %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. -%package_help - %prep -%autosetup -n %{name}-%{version} -p1 +%autosetup -n %{name}-%{version} -p1 %build -%meson -Degl_device=true -Dwayland_eglstream=true +%meson -Degl_device=true #-Dxwayland_initfd=disabled %meson_build @@ -132,11 +148,19 @@ echo "/usr/lib64/mutter-12" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.con %files -f %{name}.lang %license COPYING +%doc NEWS %{_bindir}/mutter %{_libdir}/lib*.so.* +%{_datadir}/polkit-1/actions/org.gnome.mutter.*.policy +%{_bindir}/gdctl +%{_bindir}/gnome-service-client +%{_datadir}/bash-completion/completions/gdctl %{_libdir}/mutter-%{mutter_api_version}/ %{_libexecdir}/mutter-restart-helper %{_libexecdir}/mutter-x11-frames +%{_mandir}/man1/mutter.1* +%{_mandir}/man1/gdctl.1* +%{_mandir}/man1/gnome-service-client.1* %{_datadir}/GConf/gsettings/mutter-schemas.convert %{_datadir}/glib-2.0/schemas/org.gnome.mutter.gschema.xml %{_datadir}/glib-2.0/schemas/org.gnome.mutter.wayland.gschema.xml @@ -145,19 +169,23 @@ echo "/usr/lib64/mutter-12" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.con %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %files devel +%{_datadir}/applications/org.gnome.Mutter.Mdk.desktop +%{_datadir}/glib-2.0/schemas/org.gnome.mutter.devkit.gschema.xml +%{_datadir}/icons/hicolor/*/apps/org.gnome.Mutter.Mdk* %{_includedir}/* %{_libdir}/lib*.so +%{_libdir}/mutter-%{mutter_api_version}/*.gir %{_libdir}/pkgconfig/* +%{_libexecdir}/mutter-devkit %{_libexecdir}/installed-tests/mutter-%{mutter_api_version} %{_datadir}/installed-tests/mutter-%{mutter_api_version} %{_datadir}/mutter-%{mutter_api_version}/tests -%files help -%defattr(-,root,root) -%doc NEWS -%{_mandir}/man1/*.1.gz %changelog +* Mon Sep 15 2025 liweigang - 49.0-1 +- update to version 49.0 + * Tue May 06 2025 xinghe - 44.6-5 - fix the crash of gnome icon dragging for adwaita-icon-theme-47 diff --git a/window-drag-bug.patch b/window-drag-bug.patch new file mode 100644 index 0000000000000000000000000000000000000000..21950f264dad470e874061018c3e5e700256ae3c --- /dev/null +++ b/window-drag-bug.patch @@ -0,0 +1,377 @@ + +From 7ff3b1fe7b30584a585f5b4a9887529a4a4eb3ec Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Thu, 28 Aug 2025 10:09:47 +0200 +Subject: [PATCH 01/25] window-drag: Move window resize size calculation into + helper + +This will make it usable to calculate a new window size from a window +drag in places that depend on it. +--- + src/compositor/meta-window-drag.c | 109 ++++++++++++++++++------------ + 1 file changed, 65 insertions(+), 44 deletions(-) + +diff --git a/src/compositor/meta-window-drag.c b/src/compositor/meta-window-drag.c +index 71aac9b549..80a8ac33ce 100644 +--- a/src/compositor/meta-window-drag.c ++++ b/src/compositor/meta-window-drag.c +@@ -1428,6 +1428,67 @@ queue_update_move (MetaWindowDrag *window_drag, + window_drag, NULL); + } + ++static void ++calculate_window_size (MetaWindowDrag *window_drag, ++ MetaEdgeResistanceFlags flags, ++ int *out_width, ++ int *out_height) ++{ ++ MetaWindow *window; ++ int dx, dy; ++ MetaGravity gravity; ++ MtkRectangle old_rect; ++ MtkRectangle new_rect = {}; ++ ++ window = window_drag->effective_grab_window; ++ g_return_if_fail (window); ++ ++ meta_window_get_frame_rect (window, &old_rect); ++ ++ new_rect.width = window_drag->initial_window_pos.width; ++ new_rect.height = window_drag->initial_window_pos.height; ++ ++ dx = window_drag->latest_motion_x - window_drag->anchor_root_x; ++ dy = window_drag->latest_motion_y - window_drag->anchor_root_y; ++ ++ if (window_drag->grab_op & META_GRAB_OP_WINDOW_DIR_EAST) ++ new_rect.width += dx; ++ else if (window_drag->grab_op & META_GRAB_OP_WINDOW_DIR_WEST) ++ new_rect.width -= dx; ++ ++ if (window_drag->grab_op & META_GRAB_OP_WINDOW_DIR_SOUTH) ++ new_rect.height += dy; ++ else if (window_drag->grab_op & META_GRAB_OP_WINDOW_DIR_NORTH) ++ new_rect.height -= dy; ++ ++ meta_window_maybe_apply_size_hints (window, &new_rect); ++ ++ /* One sided resizing ought to actually be one-sided, despite the fact that ++ * aspect ratio windows don't interact nicely with the above stuff. So, ++ * to avoid some nasty flicker, we enforce that. ++ */ ++ ++ if (!(window_drag->grab_op & (META_GRAB_OP_WINDOW_DIR_WEST | ++ META_GRAB_OP_WINDOW_DIR_EAST))) ++ new_rect.width = old_rect.width; ++ ++ if (!(window_drag->grab_op & (META_GRAB_OP_WINDOW_DIR_NORTH | ++ META_GRAB_OP_WINDOW_DIR_SOUTH))) ++ new_rect.height = old_rect.height; ++ ++ gravity = meta_resize_gravity_from_grab_op (window_drag->grab_op); ++ g_assert (gravity >= 0); ++ ++ meta_window_drag_edge_resistance_for_resize (window_drag, ++ &new_rect.width, ++ &new_rect.height, ++ gravity, ++ flags); ++ ++ *out_width = new_rect.width; ++ *out_height = new_rect.height; ++} ++ + static void + update_resize (MetaWindowDrag *window_drag, + MetaEdgeResistanceFlags flags, +@@ -1435,9 +1496,7 @@ update_resize (MetaWindowDrag *window_drag, + int y) + { + int dx, dy; +- MetaGravity gravity; +- MtkRectangle new_rect; +- MtkRectangle old_rect; ++ int new_width, new_height; + MetaWindow *window; + + window = window_drag->effective_grab_window; +@@ -1462,9 +1521,6 @@ update_resize (MetaWindowDrag *window_drag, + dy *= 2; + } + +- new_rect.width = window_drag->initial_window_pos.width; +- new_rect.height = window_drag->initial_window_pos.height; +- + /* Don't bother doing anything if no move has been specified. (This + * happens often, even in keyboard resizing, due to the warping of the + * pointer. +@@ -1472,6 +1528,8 @@ update_resize (MetaWindowDrag *window_drag, + if (dx == 0 && dy == 0) + return; + ++ calculate_window_size (window_drag, flags, &new_width, &new_height); ++ + if ((window_drag->grab_op & META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN) == + META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN) + { +@@ -1494,18 +1552,6 @@ update_resize (MetaWindowDrag *window_drag, + update_keyboard_resize (window_drag, TRUE); + } + +- if (window_drag->grab_op & META_GRAB_OP_WINDOW_DIR_EAST) +- new_rect.width += dx; +- else if (window_drag->grab_op & META_GRAB_OP_WINDOW_DIR_WEST) +- new_rect.width -= dx; +- +- if (window_drag->grab_op & META_GRAB_OP_WINDOW_DIR_SOUTH) +- new_rect.height += dy; +- else if (window_drag->grab_op & META_GRAB_OP_WINDOW_DIR_NORTH) +- new_rect.height -= dy; +- +- meta_window_maybe_apply_size_hints (window, &new_rect); +- + /* If we're waiting for a request for _NET_WM_SYNC_REQUEST, we'll + * resize the window when the window responds, or when we time + * the response out. +@@ -1516,35 +1562,10 @@ update_resize (MetaWindowDrag *window_drag, + return; + #endif + +- meta_window_get_frame_rect (window, &old_rect); +- +- /* One sided resizing ought to actually be one-sided, despite the fact that +- * aspect ratio windows don't interact nicely with the above stuff. So, +- * to avoid some nasty flicker, we enforce that. +- */ +- +- if ((window_drag->grab_op & (META_GRAB_OP_WINDOW_DIR_WEST | META_GRAB_OP_WINDOW_DIR_EAST)) == 0) +- new_rect.width = old_rect.width; +- +- if ((window_drag->grab_op & (META_GRAB_OP_WINDOW_DIR_NORTH | META_GRAB_OP_WINDOW_DIR_SOUTH)) == 0) +- new_rect.height = old_rect.height; +- +- /* compute gravity of client during operation */ +- gravity = meta_resize_gravity_from_grab_op (window_drag->grab_op); +- g_assert (gravity >= 0); +- + window_drag->last_edge_resistance_flags = + flags & ~META_EDGE_RESISTANCE_KEYBOARD_OP; + +- /* Do any edge resistance/snapping */ +- meta_window_drag_edge_resistance_for_resize (window_drag, +- &new_rect.width, +- &new_rect.height, +- gravity, +- flags); +- +- meta_window_resize_frame (window, TRUE, +- new_rect.width, new_rect.height); ++ meta_window_resize_frame (window, TRUE, new_width, new_height); + } + + static gboolean +-- +GitLab + + +From 0580078e8d8ea29490e488263f7bdf93e9cbd7ec Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Thu, 28 Aug 2025 10:17:30 +0200 +Subject: [PATCH 02/25] window-drag: Add helper API to calculate window size + +This will allow code that wants an up to date window size according to +an active drag to calculate it directly. +--- + src/compositor/meta-window-drag.c | 11 +++++++++++ + src/compositor/meta-window-drag.h | 4 ++++ + 2 files changed, 15 insertions(+) + +diff --git a/src/compositor/meta-window-drag.c b/src/compositor/meta-window-drag.c +index 80a8ac33ce..f04808e742 100644 +--- a/src/compositor/meta-window-drag.c ++++ b/src/compositor/meta-window-drag.c +@@ -1949,6 +1949,17 @@ meta_window_drag_update_resize (MetaWindowDrag *window_drag) + window_drag->latest_motion_y); + } + ++void ++meta_window_drag_calculate_window_size (MetaWindowDrag *window_drag, ++ int *out_width, ++ int *out_height) ++{ ++ calculate_window_size (window_drag, ++ window_drag->last_edge_resistance_flags, ++ out_width, ++ out_height); ++} ++ + MetaWindow * + meta_window_drag_get_window (MetaWindowDrag *window_drag) + { +diff --git a/src/compositor/meta-window-drag.h b/src/compositor/meta-window-drag.h +index 58d409db98..92ccf358be 100644 +--- a/src/compositor/meta-window-drag.h ++++ b/src/compositor/meta-window-drag.h +@@ -60,3 +60,7 @@ void meta_window_drag_set_position_hint (MetaWindowDrag *window_drag, + + gboolean meta_window_drag_process_event (MetaWindowDrag *window_drag, + const ClutterEvent *event); ++ ++void meta_window_drag_calculate_window_size (MetaWindowDrag *window_drag, ++ int *out_width, ++ int *out_height); +-- +GitLab + + +From e7ed286fd11752d292d5bd6e6d1d2470ad83f3ae Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Thu, 28 Aug 2025 10:28:43 +0200 +Subject: [PATCH 03/25] window/wayland: Get size from resize drags when + changing state + +When we're starting a resize drag, we're indirectly triggering a +surface-state change configuration when adding the 'resizing' +xdg_toplevel state. The state change handler inherits the last +configuration, and if that configuration was of a 'unmaximize' +configuration without any saved rect (i.e. window mapped as maximized), +the sent size was 0x0. + +However, the specification for the 'resizing' xdg_toplevel state is that +the size is a maximum, and thus 0x0 makes little sense. Address this by +deriving the size in the configuration from the active resize grab, if +there is such, avoiding sending 0x0 when adding the 'resizing' state. + +Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/4281 +--- + src/wayland/meta-window-wayland.c | 31 +++++++++++++++++++++++-------- + 1 file changed, 23 insertions(+), 8 deletions(-) + +diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c +index 104e5fc896..cfd4e2513d 100644 +--- a/src/wayland/meta-window-wayland.c ++++ b/src/wayland/meta-window-wayland.c +@@ -201,6 +201,17 @@ meta_window_wayland_configure (MetaWindowWayland *wl_window, + meta_wayland_window_configuration_ref (configuration); + } + ++static gboolean ++is_drag_resizing_window (MetaWindowDrag *window_drag, ++ MetaWindow *window) ++{ ++ return (window_drag && ++ meta_grab_op_is_resizing (meta_window_drag_get_grab_op (window_drag)) && ++ (meta_window_drag_get_window (window_drag) == window || ++ meta_window_drag_get_window (window_drag) == ++ meta_window_config_get_tile_match (window->config))); ++} ++ + static void + surface_state_changed (MetaWindow *window) + { +@@ -210,6 +221,7 @@ surface_state_changed (MetaWindow *window) + MetaWaylandWindowConfiguration *last_acked_configuration = + wl_window->last_acked_configuration; + g_autoptr (MetaWaylandWindowConfiguration) configuration = NULL; ++ MetaWindowDrag *window_drag; + + /* don't send notify when the window is being unmanaged */ + if (window->unmanaging) +@@ -231,6 +243,16 @@ surface_state_changed (MetaWindow *window) + configuration->y = 0; + } + ++ window_drag = ++ meta_compositor_get_current_window_drag (window->display->compositor); ++ if (is_drag_resizing_window (window_drag, window)) ++ { ++ configuration->has_size = TRUE; ++ meta_window_drag_calculate_window_size (window_drag, ++ &configuration->width, ++ &configuration->height); ++ } ++ + meta_window_wayland_configure (wl_window, configuration); + } + +@@ -1361,14 +1383,7 @@ meta_window_wayland_finish_move_resize (MetaWindow *window, + } + + window_drag = meta_compositor_get_current_window_drag (display->compositor); +- +- /* x/y are ignored when we're doing interactive resizing */ +- is_window_being_resized = +- (window_drag && +- meta_grab_op_is_resizing (meta_window_drag_get_grab_op (window_drag)) && +- (meta_window_drag_get_window (window_drag) == window || +- meta_window_drag_get_window (window_drag) == +- meta_window_config_get_tile_match (window->config))); ++ is_window_being_resized = is_drag_resizing_window (window_drag, window); + + frame_rect = meta_window_config_get_rect (window->config); + rect = (MtkRectangle) { +-- +GitLab + + +From 0fbc0b7237e524dc4febf288b18a9b98d59c0699 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Thu, 28 Aug 2025 17:21:35 +0200 +Subject: [PATCH 04/25] window/wayland: Remember window size when surface state + changes + +Applications (including gtk3 ones) can be a bit bad at handling 0x0 +sizes, so try a bit harder to configure with a known size. +--- + src/wayland/meta-window-wayland.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) + +diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c +index cfd4e2513d..a9e5605532 100644 +--- a/src/wayland/meta-window-wayland.c ++++ b/src/wayland/meta-window-wayland.c +@@ -218,9 +218,9 @@ surface_state_changed (MetaWindow *window) + MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (window); + MetaWaylandWindowConfiguration *last_sent_configuration = + wl_window->last_sent_configuration; +- MetaWaylandWindowConfiguration *last_acked_configuration = +- wl_window->last_acked_configuration; ++ MetaWaylandWindowConfiguration *last_acked_configuration; + g_autoptr (MetaWaylandWindowConfiguration) configuration = NULL; ++ gboolean is_configuration_up_to_date; + MetaWindowDrag *window_drag; + + /* don't send notify when the window is being unmanaged */ +@@ -234,9 +234,13 @@ surface_state_changed (MetaWindow *window) + configuration->flags = META_MOVE_RESIZE_STATE_CHANGED; + configuration->is_suspended = wl_window->is_suspended; + +- if (last_acked_configuration && +- last_acked_configuration->serial == last_sent_configuration->serial && +- last_sent_configuration->is_floating) ++ last_acked_configuration = wl_window->last_acked_configuration; ++ ++ is_configuration_up_to_date = ++ last_acked_configuration && ++ last_acked_configuration->serial == last_sent_configuration->serial; ++ ++ if (is_configuration_up_to_date && last_sent_configuration->is_floating) + { + configuration->has_position = FALSE; + configuration->x = 0; +@@ -252,6 +256,14 @@ surface_state_changed (MetaWindow *window) + &configuration->width, + &configuration->height); + } ++ else if (is_configuration_up_to_date && last_sent_configuration->is_floating) ++ { ++ MtkRectangle frame_rect = meta_window_config_get_rect (window->config); ++ ++ configuration->has_size = TRUE; ++ configuration->width = frame_rect.width; ++ configuration->height = frame_rect.height; ++ } + + meta_window_wayland_configure (wl_window, configuration); + } +-- +GitLab