Accepting request 339870 from GNOME:Factory

Scripted push of project GNOME:Next (forwarded request 339452 from Zaitor)

OBS-URL: https://build.opensuse.org/request/show/339870
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mutter?expand=0&rev=87
This commit is contained in:
Stephan Kulow 2015-10-25 18:11:31 +00:00 committed by Git OBS Bridge
commit f6bf770bb1
6 changed files with 21 additions and 229 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9fb287976b9c65f0a2aca09d0e2c4c2748d3d2cfa5f38921dbeafe4cd1d541b1
size 1467668

3
mutter-3.18.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4fdee7c9dc2db3a48f18723f47c3122aa5bddaddb8751701ce243e577e2a69a9
size 1468052

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Thu Oct 15 19:35:00 UTC 2015 - zaitor@opensuse.org
- Update to version 3.18.1:
+ Improve HiDPI support on wayland (bgo#755097).
+ Fix doubly-scaled cursor on XWayland HiDPI (bgo#755099).
+ Stop hiding titlebar buttons in dialogs (bgo#641630).
+ Add support for fullscreen/unfullscreen animations
(bgo#707248).
+ Misc. crash fixes: bgo#755096, bgo#754979, bgo#755490,
bgo#754357, bgo#745785, bgo#756642.
+ Misc. bug fixes: bgo#743339, bgo#752047, bgo#756074,
bgo#756649.
- Drop wayland-Dont-pre-multiply-root-cursor-sizes.patch and
wayland-Dont-scale-XWayland-pointer-cursor-sprites.patch: Fixed
upstream.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Oct 2 21:28:47 UTC 2015 - zaitor@opensuse.org Fri Oct 2 21:28:47 UTC 2015 - zaitor@opensuse.org

View File

@ -23,17 +23,13 @@
%endif %endif
Name: mutter Name: mutter
Version: 3.18.0 Version: 3.18.1
Release: 0 Release: 0
Summary: Window and compositing manager based on Clutter Summary: Window and compositing manager based on Clutter
License: GPL-2.0+ License: GPL-2.0+
Group: System/GUI/GNOME Group: System/GUI/GNOME
Url: http://www.gnome.org Url: http://www.gnome.org
Source: http://download.gnome.org/sources/mutter/3.18/%{name}-%{version}.tar.xz Source: http://download.gnome.org/sources/mutter/3.18/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM wayland-Dont-pre-multiply-root-cursor-sizes.patch bgo#755099 zaitor@opensuse.org - Upstream patch for HiDPI in wayland
Patch0: wayland-Dont-pre-multiply-root-cursor-sizes.patch
# PATCH-FIX-UPSTREAM wayland-Dont-scale-XWayland-pointer-cursor-sprites.patch bgo#755099 zaitor@opensuse.org - Upstream patch for HiDPI in wayland
Patch1: wayland-Dont-scale-XWayland-pointer-cursor-sprites.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gobject-introspection-devel >= 0.9.5 BuildRequires: gobject-introspection-devel >= 0.9.5
BuildRequires: intltool BuildRequires: intltool
@ -140,8 +136,6 @@ to develop applications that require these.
%prep %prep
%setup -q %setup -q
translation-update-upstream translation-update-upstream
%patch0 -p1
%patch1 -p1
%build %build
%configure \ %configure \

View File

@ -1,140 +0,0 @@
From 4f1461b9c3fd57e092ced0e95775a6f952664acf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Wed, 16 Sep 2015 15:47:31 +0800
Subject: [PATCH] wayland: Don't pre-multiply root cursor sizes with primary
monitor scale
We cannot use the XSETTINGS value for cursor theme size because
gnome-settings-daemon already multiplies it by the primary monitor's
scale.
https://bugzilla.gnome.org/show_bug.cgi?id=755099
---
src/core/prefs.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 55 insertions(+), 9 deletions(-)
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 2da8da3..90ad108 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -96,6 +96,10 @@ static gboolean bell_is_audible = TRUE;
static gboolean gnome_accessibility = FALSE;
static gboolean gnome_animations = TRUE;
static char *cursor_theme = NULL;
+/* cursor_size will, when running as an X11 compositing window manager, be the
+ * actual cursor size, multiplied with the global window scaling factor. On
+ * Wayland, it will be the actual cursor size retrieved from gsettings.
+ */
static int cursor_size = 24;
static int draggable_border_width = 10;
static int drag_threshold;
@@ -123,6 +127,9 @@ static gboolean update_binding (MetaKeyPref *binding,
static gboolean update_key_binding (const char *key,
gchar **strokes);
+static void wayland_settings_changed (GSettings *settings,
+ gchar *key,
+ gpointer data);
static void settings_changed (GSettings *settings,
gchar *key,
gpointer data);
@@ -134,9 +141,10 @@ static void shell_shows_app_menu_changed (GtkSettings *settings,
GParamSpec *pspec,
gpointer data);
-static void update_cursor_size (GtkSettings *settings,
- GParamSpec *pspec,
- gpointer data);
+static void update_cursor_size_from_gtk (GtkSettings *settings,
+ GParamSpec *pspec,
+ gpointer data);
+static void update_cursor_size (void);
static void queue_changed (MetaPreference pref);
@@ -963,14 +971,18 @@ meta_prefs_init (void)
G_CALLBACK (settings_changed), NULL);
g_signal_connect (settings, "changed::" KEY_GNOME_CURSOR_THEME,
G_CALLBACK (settings_changed), NULL);
+ if (meta_is_wayland_compositor ())
+ g_signal_connect (settings, "changed::cursor-size",
+ G_CALLBACK (wayland_settings_changed), NULL);
g_hash_table_insert (settings_schemas, g_strdup (SCHEMA_INTERFACE), settings);
g_signal_connect (gtk_settings_get_default (),
"notify::gtk-shell-shows-app-menu",
G_CALLBACK (shell_shows_app_menu_changed), NULL);
- g_signal_connect (gtk_settings_get_default (), "notify::gtk-cursor-theme-size",
- G_CALLBACK (update_cursor_size), NULL);
+ if (!meta_is_wayland_compositor ())
+ g_signal_connect (gtk_settings_get_default (), "notify::gtk-cursor-theme-size",
+ G_CALLBACK (update_cursor_size_from_gtk), NULL);
settings = g_settings_new (SCHEMA_INPUT_SOURCES);
g_signal_connect (settings, "changed::" KEY_XKB_OPTIONS,
@@ -992,7 +1004,7 @@ meta_prefs_init (void)
handle_preference_init_string_array ();
handle_preference_init_int ();
- update_cursor_size (gtk_settings_get_default (), NULL, NULL);
+ update_cursor_size ();
shell_shows_app_menu_changed (gtk_settings_get_default (), NULL, NULL);
init_bindings ();
@@ -1134,6 +1146,20 @@ meta_prefs_override_preference_schema (const char *key, const char *schema)
static void
+wayland_settings_changed (GSettings *settings,
+ gchar *key,
+ gpointer data)
+{
+ GVariant *value = g_settings_get_value (settings, key);
+ const GVariantType *type = g_variant_get_type (value);
+
+ g_return_if_fail (g_variant_type_equal (type, G_VARIANT_TYPE_INT32));
+ g_return_if_fail (g_str_equal (key, "cursor-size"));
+
+ update_cursor_size ();
+}
+
+static void
settings_changed (GSettings *settings,
gchar *key,
gpointer data)
@@ -1216,9 +1242,29 @@ shell_shows_app_menu_changed (GtkSettings *settings,
}
static void
-update_cursor_size (GtkSettings *settings,
- GParamSpec *pspec,
- gpointer data)
+update_cursor_size (void)
+{
+ if (meta_is_wayland_compositor ())
+ {
+ /* When running as a Wayland compositor, since we size of the cursor
+ * depends on what output it is on, we cannot use the GTK+
+ * "gtk-cursor-theme-size" setting because it has already been multiplied
+ * by the primary monitor scale. So, instead get the non-premultiplied
+ * cursor size value directly from gsettings instead.
+ */
+ cursor_size =
+ g_settings_get_int (SETTINGS (SCHEMA_INTERFACE), "cursor-size");
+ }
+ else
+ {
+ update_cursor_size_from_gtk (gtk_settings_get_default (), NULL, NULL);
+ }
+}
+
+static void
+update_cursor_size_from_gtk (GtkSettings *settings,
+ GParamSpec *pspec,
+ gpointer data)
{
GdkScreen *screen = gdk_screen_get_default ();
GValue value = G_VALUE_INIT;
--
2.4.3

View File

@ -1,79 +0,0 @@
From 505fcdc37c18ed2ed6b45173683a5d6e5e2e33fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Wed, 16 Sep 2015 15:49:46 +0800
Subject: [PATCH] wayland: Don't scale XWayland pointer cursor sprites
We don't have any way of knowing what the intended size of a XWayland
cursor is supposed to be, so lets do what we do with regular XWayland
surfaces and don't scale them. The result is that cursor sprites of
HiDPI aware X11 clients will show correctly, but non-aware clients may
have tiny cursor sprites.
https://bugzilla.gnome.org/show_bug.cgi?id=755099
---
src/wayland/meta-wayland-pointer.c | 10 +++++++---
src/wayland/meta-xwayland.c | 9 +++++++++
src/wayland/meta-xwayland.h | 5 +++++
3 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 08172fb..82dd2c1 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -820,9 +820,13 @@ cursor_sprite_prepare_at (MetaCursorSprite *cursor_sprite,
MetaScreen *screen = display->screen;
const MetaMonitorInfo *monitor;
- monitor = meta_screen_get_monitor_for_point (screen, x, y);
- meta_cursor_sprite_set_texture_scale (cursor_sprite,
- (float)monitor->scale / surface->scale);
+
+ if (!meta_xwayland_is_xwayland_surface (surface))
+ {
+ monitor = meta_screen_get_monitor_for_point (screen, x, y);
+ meta_cursor_sprite_set_texture_scale (cursor_sprite,
+ (float)monitor->scale / surface->scale);
+ }
meta_wayland_surface_update_outputs (surface);
}
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 1e7cb34..3cfc69f 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -172,6 +172,15 @@ meta_xwayland_handle_wl_surface_id (MetaWindow *window,
}
}
+gboolean
+meta_xwayland_is_xwayland_surface (MetaWaylandSurface *surface)
+{
+ MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
+ MetaXWaylandManager *manager = &compositor->xwayland_manager;
+
+ return wl_resource_get_client (surface->resource) == manager->client;
+}
+
static gboolean
try_display (int display,
char **filename_out,
diff --git a/src/wayland/meta-xwayland.h b/src/wayland/meta-xwayland.h
index 5308f29..caaf510 100644
--- a/src/wayland/meta-xwayland.h
+++ b/src/wayland/meta-xwayland.h
@@ -28,8 +28,13 @@
#include <glib.h>
#include <meta/types.h>
+#include "wayland/meta-wayland-types.h"
+
void
meta_xwayland_handle_wl_surface_id (MetaWindow *window,
guint32 surface_id);
+gboolean
+meta_xwayland_is_xwayland_surface (MetaWaylandSurface *surface);
+
#endif /* META_XWAYLAND_H */
--
2.4.3