diff options
author | Térence Clastres | 2019-04-03 23:38:12 +0200 |
---|---|---|
committer | Térence Clastres | 2019-04-03 23:38:12 +0200 |
commit | f3beb0f0cec63f44dc684e6e3406cf6c584343b2 (patch) | |
tree | a332b880859b3e93c7a32178a838a2af0b34d2b1 | |
parent | 5be12a8671bfbcb8a14512703187431e6b831b46 (diff) | |
download | aur-f3beb0f0cec63f44dc684e6e3406cf6c584343b2.tar.gz |
Sync with [extra], fix versioning
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | 0001-wayland-output-Report-unscaled-size-even-in-logical-.patch | 147 | ||||
-rw-r--r-- | 0001-wayland-xdg-shell-Correct-window-menu-position-in-lo.patch | 42 | ||||
-rw-r--r-- | PKGBUILD | 17 |
4 files changed, 160 insertions, 56 deletions
@@ -1,7 +1,7 @@ pkgbase = mutter-781835-workaround pkgdesc = A window manager for GNOME. This package reverts a commit which may causes performance problems for nvidia driver users. Some performance patches also included. - pkgver = 3.32.0+42+g58f7059ea - pkgrel = 5 + pkgver = 3.32.0+49+gb2d0184c6 + pkgrel = 1 url = https://gitlab.gnome.org/GNOME/mutter arch = x86_64 groups = gnome @@ -30,12 +30,12 @@ pkgbase = mutter-781835-workaround depends = gnome-shell provides = mutter conflicts = mutter - source = mutter-781835-workaround::git+https://gitlab.gnome.org/GNOME/mutter.git#commit=58f7059ea42c04fbb28c7210a287437f0f55b2d8 - source = 0001-wayland-xdg-shell-Correct-window-menu-position-in-lo.patch + source = mutter-781835-workaround::git+https://gitlab.gnome.org/GNOME/mutter.git#commit=b2d0184c6efa164ad5dd7a2ca8b10cf13acf5b4c + source = 0001-wayland-output-Report-unscaled-size-even-in-logical-.patch source = 216.patch source = revert.patch sha256sums = SKIP - sha256sums = 8628fe45738d631d7776204be76cc091c5a1359d2874945c7913c7705330f816 + sha256sums = 842162bf8cec5d69fdb80c85fd152ddd3db6a9179d11d6f81d486f79814838c0 sha256sums = ed4f3cf738a3cffdf8a6e1a352bf24d74078c3b26fb9262c5746e0d95b9df756 sha256sums = 2d2e305e0a6cca087bb8164f81bdc0ae7a5ca8e9c13c81d7fd5252eb3563fc09 diff --git a/0001-wayland-output-Report-unscaled-size-even-in-logical-.patch b/0001-wayland-output-Report-unscaled-size-even-in-logical-.patch new file mode 100644 index 000000000000..be86633bd2a2 --- /dev/null +++ b/0001-wayland-output-Report-unscaled-size-even-in-logical-.patch @@ -0,0 +1,147 @@ +From 761000ec8f4b53d0fa06f235be2ed30b80ec5bcb Mon Sep 17 00:00:00 2001 +Message-Id: <761000ec8f4b53d0fa06f235be2ed30b80ec5bcb.1553890447.git.jan.steffens@gmail.com> +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Wed, 27 Mar 2019 00:38:02 +0100 +Subject: [PATCH] wayland/output: Report unscaled size even in logical layout + mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In physical layout mode, the size and scale of the `wl_output` matches +the actual monitor: + +| Monitor | `wl_output` | `GdkMonitor` | +| ------------ | ------------ | ------------ | +| 3840×2160 @1 | 3840×2160 @1 | 3840×2160 @1 | +| 3840×2160 @2 | 3840×2160 @2 | 1920×1080 @2 | + +GTK currently does not support `xdg_output`. To estimate the logical +output size for `GdkMonitor`, it divides the output's size by its scale +factor. There might be other legacy clients making the same assumption. + +In logical layout mode, mutter currently reports logical geometry for +the `wl_output`s, but this no longer matches the monitors: + +| Monitor | `wl_output` | `GdkMonitor` | +| -------------- | ------------ | ------------ | +| 3840×2160 @1 | 3840×2160 @1 | 3840×2160 @1 | +| 3840×2160 @2 | 1920×1080 @2 | 960×540 @2 | +| 3840×2160 @1.5 | 2560×1440 @2 | 1280×720 @2 | + +This patch changes logical layout mode to multiply the sizes by the +`wl_output`'s scale factor before sending them to the client. Now the +sizes match the physical layout mode again: + +| Monitor | `wl_output` | `GdkMonitor` | +| -------------- | ------------ | ------------ | +| 3840×2160 @1 | 3840×2160 @1 | 3840×2160 @1 | +| 3840×2160 @2 | 3840×2160 @2 | 1920×1080 @2 | +| 3840×2160 @1.5 | 5120×2880 @2 | 2560×1440 @2 | + +Unfortunately, non-integer output scales are not representable in +`wl_output`. Still, I believe these values are better than before, and +the best we can do for clients that do not know about `xdg_output`: The +size of the output will match the size that a buffer for a fullscreen +surface should have at the indicated scale. + +Fixes part of https://bugzilla.mozilla.org/show_bug.cgi?id=1534089 +https://gitlab.gnome.org/GNOME/mutter/merge_requests/510 +--- + src/wayland/meta-wayland-outputs.c | 33 +++++++++++++++++++----------- + 1 file changed, 21 insertions(+), 12 deletions(-) + +diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c +index 7695d86af..712a143a8 100644 +--- a/src/wayland/meta-wayland-outputs.c ++++ b/src/wayland/meta-wayland-outputs.c +@@ -181,24 +181,36 @@ send_output_events (struct wl_resource *resource, + MetaLogicalMonitor *old_logical_monitor; + guint old_mode_flags; + gint old_scale; ++ gint scale; ++ MetaRectangle old_rect; ++ MetaRectangle rect; + float old_refresh_rate; + float refresh_rate; + + old_logical_monitor = wayland_output->logical_monitor; + old_mode_flags = wayland_output->mode_flags; + old_scale = wayland_output->scale; ++ old_rect = old_logical_monitor->rect; + old_refresh_rate = wayland_output->refresh_rate; + ++ scale = calculate_wayland_output_scale (logical_monitor); ++ rect = logical_monitor->rect; + monitor = pick_main_monitor (logical_monitor); +- + current_mode = meta_monitor_get_current_mode (monitor); + refresh_rate = meta_monitor_mode_get_refresh_rate (current_mode); + ++ if (meta_is_stage_views_scaled ()) { ++ old_rect.width *= old_scale; ++ old_rect.height *= old_scale; ++ rect.width *= scale; ++ rect.height *= scale; ++ } ++ + gboolean need_done = FALSE; + + if (need_all_events || +- old_logical_monitor->rect.x != logical_monitor->rect.x || +- old_logical_monitor->rect.y != logical_monitor->rect.y || ++ old_rect.x != rect.x || ++ old_rect.y != rect.y || + is_different_rotation (old_logical_monitor, logical_monitor)) + { + int width_mm, height_mm; +@@ -229,40 +241,37 @@ send_output_events (struct wl_resource *resource, + transform = WL_OUTPUT_TRANSFORM_NORMAL; + + wl_output_send_geometry (resource, +- logical_monitor->rect.x, +- logical_monitor->rect.y, ++ rect.x, ++ rect.y, + width_mm, + height_mm, + subpixel_order, + vendor, + product, + transform); + need_done = TRUE; + } + + preferred_mode = meta_monitor_get_preferred_mode (monitor); + if (current_mode == preferred_mode) + mode_flags |= WL_OUTPUT_MODE_PREFERRED; + + if (need_all_events || +- old_logical_monitor->rect.width != logical_monitor->rect.width || +- old_logical_monitor->rect.height != logical_monitor->rect.height || ++ old_rect.width != rect.width || ++ old_rect.height != rect.height || + old_refresh_rate != refresh_rate || + old_mode_flags != mode_flags) + { + wl_output_send_mode (resource, + mode_flags, +- logical_monitor->rect.width, +- logical_monitor->rect.height, ++ rect.width, ++ rect.height, + (int32_t) (refresh_rate * 1000)); + need_done = TRUE; + } + + if (version >= WL_OUTPUT_SCALE_SINCE_VERSION) + { +- int scale; +- +- scale = calculate_wayland_output_scale (logical_monitor); + if (need_all_events || + old_scale != scale) + { +-- +2.21.0 + diff --git a/0001-wayland-xdg-shell-Correct-window-menu-position-in-lo.patch b/0001-wayland-xdg-shell-Correct-window-menu-position-in-lo.patch deleted file mode 100644 index 47390ba3a7fb..000000000000 --- a/0001-wayland-xdg-shell-Correct-window-menu-position-in-lo.patch +++ /dev/null @@ -1,42 +0,0 @@ -From da01a3eaffe01ae2c3ea826171057548c7973c39 Mon Sep 17 00:00:00 2001 -Message-Id: <da01a3eaffe01ae2c3ea826171057548c7973c39.1553635567.git.jan.steffens@gmail.com> -From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> -Date: Tue, 26 Mar 2019 22:24:44 +0100 -Subject: [PATCH] wayland/xdg-shell: Correct window menu position in logical - layout mode - -Fixes https://gitlab.gnome.org/GNOME/mutter/issues/527 ---- - src/wayland/meta-wayland-legacy-xdg-shell.c | 2 +- - src/wayland/meta-wayland-xdg-shell.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/wayland/meta-wayland-legacy-xdg-shell.c b/src/wayland/meta-wayland-legacy-xdg-shell.c -index 1523481d4..823064177 100644 ---- a/src/wayland/meta-wayland-legacy-xdg-shell.c -+++ b/src/wayland/meta-wayland-legacy-xdg-shell.c -@@ -258,7 +258,7 @@ zxdg_toplevel_v6_show_window_menu (struct wl_client *client, - if (!meta_wayland_seat_get_grab_info (seat, surface, serial, FALSE, NULL, NULL)) - return; - -- monitor_scale = window->monitor->scale; -+ monitor_scale = meta_window_wayland_get_geometry_scale (window); - meta_window_show_menu (window, META_WINDOW_MENU_WM, - window->buffer_rect.x + (x * monitor_scale), - window->buffer_rect.y + (y * monitor_scale)); -diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c -index d747f5c07..fa0207a03 100644 ---- a/src/wayland/meta-wayland-xdg-shell.c -+++ b/src/wayland/meta-wayland-xdg-shell.c -@@ -264,7 +264,7 @@ xdg_toplevel_show_window_menu (struct wl_client *client, - if (!meta_wayland_seat_get_grab_info (seat, surface, serial, FALSE, NULL, NULL)) - return; - -- monitor_scale = window->monitor->scale; -+ monitor_scale = meta_window_wayland_get_geometry_scale (window); - meta_window_show_menu (window, META_WINDOW_MENU_WM, - window->buffer_rect.x + (x * monitor_scale), - window->buffer_rect.y + (y * monitor_scale)); --- -2.21.0 - @@ -13,8 +13,8 @@ _revert= pkgname=mutter-781835-workaround -pkgver=3.32.0+42+g58f7059ea -pkgrel=5 +pkgver=3.32.0+49+gb2d0184c6 +pkgrel=1 pkgdesc="A window manager for GNOME. This package reverts a commit which may causes performance problems for nvidia driver users. Some performance patches also included." url="https://gitlab.gnome.org/GNOME/mutter" arch=(x86_64) @@ -27,21 +27,20 @@ checkdepends=(xorg-server-xvfb) provides=(mutter) conflicts=(mutter) groups=(gnome) -_commit=58f7059ea42c04fbb28c7210a287437f0f55b2d8 # master +_commit=b2d0184c6efa164ad5dd7a2ca8b10cf13acf5b4c # master source=("$pkgname::git+https://gitlab.gnome.org/GNOME/mutter.git#commit=$_commit" - 0001-wayland-xdg-shell-Correct-window-menu-position-in-lo.patch + 0001-wayland-output-Report-unscaled-size-even-in-logical-.patch 216.patch revert.patch) sha256sums=('SKIP' - '8628fe45738d631d7776204be76cc091c5a1359d2874945c7913c7705330f816' + '842162bf8cec5d69fdb80c85fd152ddd3db6a9179d11d6f81d486f79814838c0' 'ed4f3cf738a3cffdf8a6e1a352bf24d74078c3b26fb9262c5746e0d95b9df756' '2d2e305e0a6cca087bb8164f81bdc0ae7a5ca8e9c13c81d7fd5252eb3563fc09') pkgver() { cd $pkgname - _manual_bump=42 # horrible temporary workaround to account new versioning - git describe --tags | sed "s/-/+/g;s/33/$_manual_bump/" + git describe --tags | sed "s/-/+/g" } prepare() { @@ -103,8 +102,8 @@ prepare() { patch -Np1 -i ../revert.patch fi - # https://gitlab.gnome.org/GNOME/mutter/issues/527 - patch -Np1 -i ../0001-wayland-xdg-shell-Correct-window-menu-position-in-lo.patch + # https://bugzilla.mozilla.org/show_bug.cgi?id=1534089 + patch -Np1 -i ../0001-wayland-output-Report-unscaled-size-even-in-logical-.patch # cogl-winsys-glx: Fix frame notification race/leak [performance] # https://gitlab.gnome.org/GNOME/mutter/merge_requests/216 |