diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | mr2720.patch | 64 |
3 files changed, 84 insertions, 8 deletions
@@ -1,7 +1,7 @@ pkgbase = mutter-performance pkgdesc = A window manager for GNOME | Attempts to improve performances with non-upstreamed merge-requests and frequent stable branch resync pkgver = 43.1+r2+g6a962803e - pkgrel = 1 + pkgrel = 2 url = https://gitlab.gnome.org/GNOME/mutter arch = x86_64 license = GPL @@ -36,11 +36,13 @@ pkgbase = mutter-performance source = mr1880.patch source = mr2671.patch source = mr2694.patch + source = mr2720.patch sha256sums = SKIP sha256sums = d7a014965cbb90892ccbe65d0de49ddce50191dbd7521467d7f11c2f4825045c sha256sums = 6e6ff34859c7654eb6bf56b8658fcedfac460d05d4dd41ed7c305a78f03513cf sha256sums = 45ba598e88a4b18ab2d0522abe058efaf0ceb05895bae6f31887bcd4492c45ce sha256sums = 620aabe6b59a6b4ccde95c0aecf98c290ad218c0b8a340bb0bc075c6cc0846e1 + sha256sums = 34426cc2ae75f3fc462fcdcfa3bd8ebe8f233d167a96a9f3cbe55b9a5aeba076 pkgname = mutter-performance groups = gnome @@ -12,8 +12,8 @@ ### PACKAGE OPTIONS ## MERGE REQUESTS SELECTION -# Merge Requests List: ('579' '1441' '1880' '2671' '2694') -_merge_requests_to_use=('1441' '1880' '2671' '2694') +# Merge Requests List: ('579' '1441' '1880' '2671' '2694' '2720') +_merge_requests_to_use=('1441' '1880' '2694' '2720') ## Disable building the DOCS package (Enabled if not set) # Remember to unset this variable when producing .SRCINFO @@ -32,7 +32,7 @@ else pkgname=(mutter-performance mutter-performance-docs) fi pkgver=43.1+r2+g6a962803e -pkgrel=1 +pkgrel=2 pkgdesc="A window manager for GNOME | Attempts to improve performances with non-upstreamed merge-requests and frequent stable branch resync" url="https://gitlab.gnome.org/GNOME/mutter" arch=(x86_64) @@ -51,12 +51,14 @@ source=("$pkgname::git+https://gitlab.gnome.org/GNOME/mutter.git#commit=$_commit 'mr1441.patch' 'mr1880.patch' 'mr2671.patch' - 'mr2694.patch') + 'mr2694.patch' + 'mr2720.patch') sha256sums=('SKIP' 'd7a014965cbb90892ccbe65d0de49ddce50191dbd7521467d7f11c2f4825045c' '6e6ff34859c7654eb6bf56b8658fcedfac460d05d4dd41ed7c305a78f03513cf' '45ba598e88a4b18ab2d0522abe058efaf0ceb05895bae6f31887bcd4492c45ce' - '620aabe6b59a6b4ccde95c0aecf98c290ad218c0b8a340bb0bc075c6cc0846e1') + '620aabe6b59a6b4ccde95c0aecf98c290ad218c0b8a340bb0bc075c6cc0846e1' + '34426cc2ae75f3fc462fcdcfa3bd8ebe8f233d167a96a9f3cbe55b9a5aeba076') pkgver() { cd $pkgname @@ -162,8 +164,7 @@ prepare() { # Type: 1 # Status: 2 # Comment: Avoid some allocations, save some CPU cycles and make the code easier to read. - # NOTE: This changes mutter's behaviors, which can bring regressions when using extensions. - # Disable this MR if you encounter errors with those extensions. + # NOTE: This changes mutter's behaviors, which can bring regressions when using some extensions. pick_mr '2671' 'mr2671.patch' 'patch' # Title: clutter/actor: Show on all stage-views when actors have no allocation @@ -175,6 +176,15 @@ prepare() { # set priv->stage_views to all available stage views. pick_mr '2694' 'mr2694.patch' 'patch' + # Title: window/wayland: Calculate bottom and right frame extents + # Author: Sebastian Keller <skeller@gnome.org> + # URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2720 + # Type: 3 + # Status: 2 + # Comment: Fixes: 6cbc5180 + # Closes: gnome-shell#6050 + pick_mr '2720' 'mr2720.patch' 'patch' + } build() { diff --git a/mr2720.patch b/mr2720.patch new file mode 100644 index 000000000000..02be936d1c4d --- /dev/null +++ b/mr2720.patch @@ -0,0 +1,64 @@ +Author: Sebastian Keller <skeller@gnome.org> +Source: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2720 +Editor: Mingi Sung <FiestaLake@protonmail.com> +Commit: b5d720d37774fff4addd64c2fc5a1667cdd77699 +Last Updated: 11/27/22 (Mutter 43.1+r2+g6a962803e-2) +--- + +The bottom and right frame extents were never calculated and thus always +remained 0. This did not lead to any obvious problems until commit 6cbc5180 +which started relying on those to calculate the buffer rect. This +resulted for example in window screenshots being cut off at the bottom +right corner of the window rather than the buffer. + +Fixes: 6cbc5180 +Closes: gnome-shell#6050 + +--- +diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c +index b31d11d46082a5a13cc67125b7711dd6d0511c68..3886ae9e2d3d915d680ff2148d4d46e76f999baa 100644 +--- a/src/wayland/meta-window-wayland.c ++++ b/src/wayland/meta-window-wayland.c +@@ -626,6 +626,10 @@ meta_window_wayland_main_monitor_changed (MetaWindow *window, + (int)(scale_factor * window->custom_frame_extents.left); + window->custom_frame_extents.top = + (int)(scale_factor * window->custom_frame_extents.top); ++ window->custom_frame_extents.right = ++ (int)(scale_factor * window->custom_frame_extents.right); ++ window->custom_frame_extents.bottom = ++ (int)(scale_factor * window->custom_frame_extents.bottom); + + /* Buffer rect. */ + scale_rect_size (&window->buffer_rect, scale_factor); +@@ -1093,6 +1097,7 @@ meta_window_wayland_finish_move_resize (MetaWindow *window, + { + MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (window); + MetaDisplay *display = window->display; ++ MetaWaylandSurface *surface = window->surface; + int dx, dy; + int geometry_scale; + MetaGravity gravity; +@@ -1126,8 +1131,21 @@ meta_window_wayland_finish_move_resize (MetaWindow *window, + dy = pending->dy * geometry_scale; + + /* XXX: Find a better place to store the window geometry offsets. */ +- window->custom_frame_extents.left = new_geom.x; +- window->custom_frame_extents.top = new_geom.y; ++ if (meta_wayland_surface_get_buffer (surface)) ++ { ++ window->custom_frame_extents.left = new_geom.x; ++ window->custom_frame_extents.top = new_geom.y; ++ window->custom_frame_extents.right = ++ meta_wayland_surface_get_width (surface) * geometry_scale - ++ new_geom.x - new_geom.width; ++ window->custom_frame_extents.bottom = ++ meta_wayland_surface_get_height (surface) * geometry_scale - ++ new_geom.y - new_geom.height; ++ } ++ else ++ { ++ window->custom_frame_extents = (GtkBorder) { 0 }; ++ } + + flags = META_MOVE_RESIZE_WAYLAND_FINISH_MOVE_RESIZE; + |