Accepting request 1104346 from home:yfjiang:branches:GNOME:Factory

OBS-URL: https://build.opensuse.org/request/show/1104346
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=457
This commit is contained in:
Dominique Leuenberger 2023-08-21 07:10:59 +00:00 committed by Git OBS Bridge
parent b338e9b985
commit d9c8908f27
4 changed files with 60 additions and 67 deletions

View File

@ -1,22 +0,0 @@
From 1511039a96d158bcf4b731599ae3af3f98b9b166 Mon Sep 17 00:00:00 2001
From: Chingkai <qkzhu@suse.com>
Date: Thu, 21 Feb 2019 12:39:52 +0800
Subject: [PATCH] monitor: Lower HIDPI_LIMIT to 144
---
src/backends/meta-monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mutter-44.beta/src/backends/meta-monitor.c
===================================================================
--- mutter-44.beta.orig/src/backends/meta-monitor.c
+++ mutter-44.beta/src/backends/meta-monitor.c
@@ -1805,7 +1805,7 @@ meta_monitor_calculate_crtc_pos (MetaMon
}
/* The minimum resolution at which we turn on a window-scale of 2 */
-#define HIDPI_LIMIT 192
+#define HIDPI_LIMIT 144
/*
* The minimum screen height at which we turn on a window-scale of 2;

View File

@ -1,8 +1,8 @@
Index: mutter-41.0/src/core/display.c
Index: mutter-44.3/src/core/display.c
===================================================================
--- mutter-41.0.orig/src/core/display.c
+++ mutter-41.0/src/core/display.c
@@ -826,6 +826,8 @@ meta_display_new (MetaContext *context,
--- mutter-44.3.orig/src/core/display.c
+++ mutter-44.3/src/core/display.c
@@ -880,6 +880,8 @@ meta_display_new (MetaContext *context,
display->check_fullscreen_later = 0;
display->work_area_later = 0;
@ -11,8 +11,8 @@ Index: mutter-41.0/src/core/display.c
display->mouse_mode = TRUE; /* Only relevant for mouse or sloppy focus */
display->allow_terminal_deactivation = TRUE; /* Only relevant for when a
terminal has the focus */
@@ -1141,6 +1143,50 @@ meta_display_close (MetaDisplay *display
the_display = NULL;
@@ -1208,6 +1210,50 @@ meta_grab_op_is_moving (MetaGrabOp op)
return !meta_grab_op_is_resizing (op);
}
+/* Grab/ungrab routines taken from fvwm.
@ -60,22 +60,22 @@ Index: mutter-41.0/src/core/display.c
+}
+
/**
* meta_display_for_x_display:
* @xdisplay: An X display
Index: mutter-41.0/src/core/display-private.h
* meta_display_windows_are_interactable:
* @op: A #MetaGrabOp
Index: mutter-44.3/src/core/display-private.h
===================================================================
--- mutter-41.0.orig/src/core/display-private.h
+++ mutter-41.0/src/core/display-private.h
@@ -140,6 +140,8 @@ struct _MetaDisplay
--- mutter-44.3.orig/src/core/display-private.h
+++ mutter-44.3/src/core/display-private.h
@@ -105,6 +105,8 @@ struct _MetaDisplay
GHashTable *stamps;
GHashTable *wayland_windows;
+ int server_grab_count;
+
/* serials of leave/unmap events that may
* correspond to an enter event we should
* ignore
@@ -258,6 +260,8 @@ struct _MetaDisplayClass
guint32 current_time;
/* We maintain a sequence counter, incremented for each #MetaWindow
@@ -189,6 +191,8 @@ struct _MetaDisplayClass
MetaDisplay * meta_display_new (MetaContext *context,
GError **error);
@ -84,11 +84,11 @@ Index: mutter-41.0/src/core/display-private.h
void meta_display_manage_all_xwindows (MetaDisplay *display);
void meta_display_unmanage_windows (MetaDisplay *display,
Index: mutter-41.0/src/core/keybindings.c
Index: mutter-44.3/src/core/keybindings.c
===================================================================
--- mutter-41.0.orig/src/core/keybindings.c
+++ mutter-41.0/src/core/keybindings.c
@@ -1253,6 +1253,9 @@ meta_display_grab_window_buttons (MetaDi
--- mutter-44.3.orig/src/core/keybindings.c
+++ mutter-44.3/src/core/keybindings.c
@@ -1257,6 +1257,9 @@ meta_display_grab_window_buttons (MetaDi
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
@ -98,7 +98,7 @@ Index: mutter-41.0/src/core/keybindings.c
/* Grab Alt + button1 for moving window.
* Grab Alt + button2 for resizing window.
* Grab Alt + button3 for popping up window menu.
@@ -1289,6 +1292,9 @@ meta_display_ungrab_window_buttons (Meta
@@ -1293,6 +1296,9 @@ meta_display_ungrab_window_buttons (Meta
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
@ -108,7 +108,7 @@ Index: mutter-41.0/src/core/keybindings.c
if (keys->window_grab_modifiers == 0)
return;
@@ -1319,6 +1325,9 @@ meta_display_grab_focus_window_button (M
@@ -1323,6 +1329,9 @@ meta_display_grab_focus_window_button (M
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
@ -118,7 +118,7 @@ Index: mutter-41.0/src/core/keybindings.c
/* Grab button 1 for activating unfocused windows */
meta_verbose ("Grabbing unfocused window buttons for %s", window->desc);
@@ -1343,6 +1352,9 @@ meta_display_ungrab_focus_window_button
@@ -1347,6 +1356,9 @@ meta_display_ungrab_focus_window_button
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
@ -128,18 +128,17 @@ Index: mutter-41.0/src/core/keybindings.c
meta_verbose ("Ungrabbing unfocused window buttons for %s", window->desc);
if (!window->have_focus_click_grab)
@@ -1588,6 +1600,10 @@ meta_window_grab_keys (MetaWindow *wind
@@ -1601,6 +1613,9 @@ meta_window_grab_keys (MetaWindow *wind
if (meta_is_wayland_compositor ())
return;
+
+ if (display->server_grab_count > 0)
+ return;
+
if (window->all_keys_grabbed)
return;
@@ -1627,6 +1643,9 @@ meta_window_ungrab_keys (MetaWindow *wi
if (window->type == META_WINDOW_DOCK
|| window->override_redirect)
{
@@ -1637,6 +1652,9 @@ meta_window_ungrab_keys (MetaWindow *wi
MetaDisplay *display = window->display;
MetaKeyBindingManager *keys = &display->key_binding_manager;
@ -149,11 +148,11 @@ Index: mutter-41.0/src/core/keybindings.c
if (window->grab_on_frame &&
window->frame != NULL)
change_window_keygrabs (keys, window->frame->xwindow, FALSE);
Index: mutter-41.0/src/x11/meta-x11-display.c
Index: mutter-44.3/src/x11/meta-x11-display.c
===================================================================
--- mutter-41.0.orig/src/x11/meta-x11-display.c
+++ mutter-41.0/src/x11/meta-x11-display.c
@@ -1916,7 +1916,7 @@ meta_x11_display_set_input_focus_interna
--- mutter-44.3.orig/src/x11/meta-x11-display.c
+++ mutter-44.3/src/x11/meta-x11-display.c
@@ -2013,7 +2013,7 @@ meta_x11_display_set_input_focus_interna
* we know which is which by making two requests that the server will
* process at the same time.
*/
@ -162,7 +161,7 @@ Index: mutter-41.0/src/x11/meta-x11-display.c
XSetInputFocus (x11_display->xdisplay,
xwindow,
@@ -1928,8 +1928,7 @@ meta_x11_display_set_input_focus_interna
@@ -2025,8 +2025,7 @@ meta_x11_display_set_input_focus_interna
x11_display->atom__MUTTER_FOCUS_SET,
XA_STRING, 8, PropModeAppend, NULL, 0);
@ -172,12 +171,12 @@ Index: mutter-41.0/src/x11/meta-x11-display.c
meta_x11_error_trap_pop (x11_display);
}
Index: mutter-41.0/src/x11/window-x11.c
Index: mutter-44.3/src/x11/window-x11.c
===================================================================
--- mutter-41.0.orig/src/x11/window-x11.c
+++ mutter-41.0/src/x11/window-x11.c
@@ -522,6 +522,8 @@ meta_window_x11_manage (MetaWindow *wind
--- mutter-44.3.orig/src/x11/window-x11.c
+++ mutter-44.3/src/x11/window-x11.c
@@ -548,6 +548,8 @@ meta_window_x11_manage (MetaWindow *wind
meta_sync_counter_init (&priv->sync_counter, window, window->xwindow);
meta_icon_cache_init (&priv->icon_cache);
+ meta_display_grab (display);
@ -185,7 +184,7 @@ Index: mutter-41.0/src/x11/window-x11.c
meta_x11_display_register_x_window (display->x11_display,
&window->xwindow,
window);
@@ -582,6 +584,13 @@ meta_window_x11_manage (MetaWindow *wind
@@ -620,6 +622,13 @@ meta_window_x11_initialize_state (MetaWi
meta_window_x11_update_shape_region (window);
meta_window_x11_update_input_region (window);

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Aug 17 09:36:34 UTC 2023 - Yifan Jiang <yfjiang@suse.com>
- Disable %autopatch on SLE which has not the macro ready.
- Rebase mutter-SLE-bsc984738-grab-display.patch.
- Drop mutter-Lower-HIDPI_LIMIT-to-144.patch (fate#326682,
bsc#112546). The upstream has reworked the logic of scale factor
selection based on actual screen size, see:
https://gitlab.gnome.org/GNOME/mutter/-/commit/2f1dd049bfbbb60e0b3c2351e9ba1d014205551f
-------------------------------------------------------------------
Thu Jul 6 18:10:34 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>

View File

@ -44,8 +44,6 @@ Patch1000: mutter-SLE-bell.patch
Patch1001: mutter-SLE-relax-some-constraints-on-CSD-windows.patch
# PATCH-FIX-SLE mutter-SLE-bsc984738-grab-display.patch bsc#984738 bgo#769387 hpj@suse.com -- Revert a upstream commit to avoid X11 race condition that results in wrong dialog sizes.
Patch1002: mutter-SLE-bsc984738-grab-display.patch
# PATCH-NEEDS-REBASE mutter-Lower-HIDPI_LIMIT-to-144.patch fate#326682, bsc#1125467 qkzhu@suse.com -- Lower HIDPI_LIMIT to 144 WAS
Patch1003: mutter-Lower-HIDPI_LIMIT-to-144.patch
BuildRequires: Mesa-libGLESv3-devel
BuildRequires: fdupes
@ -142,10 +140,18 @@ applications that want to make use of the mutter library.
%prep
%autosetup -N
%if !0%{?sle_version}
%autopatch -p1 -M 999
%else
%patch1 -p1
%patch2 -p1
%patch3 -p1
%endif
# SLE-only patches and translations.
%if 0%{?sle_version}
%autopatch -p1 -m 1000
%patch1000 -p1
%patch1001 -p1
%patch1002 -p1
%endif
%build