[arch-commits] Commit in mutter/trunk (2 files)

Jan Steffens heftig at archlinux.org
Wed Jul 17 21:47:03 UTC 2019


    Date: Wednesday, July 17, 2019 @ 21:47:03
  Author: heftig
Revision: 358106

3.32.2+40+gccab0f470-2

Added:
  mutter/trunk/0001-window-x11-Focus-a-window-in-the-active-workspace-as.patch
Modified:
  mutter/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-window-x11-Focus-a-window-in-the-active-workspace-as.patch |   67 ++++++++++
 PKGBUILD                                                        |   11 +
 2 files changed, 75 insertions(+), 3 deletions(-)

Added: 0001-window-x11-Focus-a-window-in-the-active-workspace-as.patch
===================================================================
--- 0001-window-x11-Focus-a-window-in-the-active-workspace-as.patch	                        (rev 0)
+++ 0001-window-x11-Focus-a-window-in-the-active-workspace-as.patch	2019-07-17 21:47:03 UTC (rev 358106)
@@ -0,0 +1,67 @@
+From 128aef6aca88ea945c3e161b82d3cffb37a8bce7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail at 3v1n0.net>
+Date: Wed, 17 Jul 2019 01:13:48 +0200
+Subject: [PATCH] window-x11: Focus a window in the active workspace as
+ take-focus fallback
+
+Starting with commit 2db94e2e we try to focus a fallback default focus window
+if no take-focus window candidate gets the input focus when we request it and
+we limit the focus candidates to the current window's workspace.
+
+However, if the window is unmanaging, the workspace might be unset, and we could
+end up in deferencing a NULL pointer causing a crash.
+
+So, in case the window's workspace is unset, just use the currently active
+workspace for the display.
+
+Closes #687
+
+https://gitlab.gnome.org/GNOME/mutter/merge_requests/688
+
+(cherry picked from commit 8cbad75c411282855f506855fc7a2953b7bdae0d)
+---
+ src/x11/window-x11.c | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
+index 0ca651ba2..79a9dbe38 100644
+--- a/src/x11/window-x11.c
++++ b/src/x11/window-x11.c
+@@ -886,15 +886,21 @@ meta_window_x11_maybe_focus_delayed (MetaWindow *window,
+ }
+ 
+ static void
+-maybe_focus_default_window (MetaWorkspace *workspace,
+-                            MetaWindow    *not_this_one,
+-                            guint32        timestamp)
++maybe_focus_default_window (MetaDisplay *display,
++                            MetaWindow  *not_this_one,
++                            guint32      timestamp)
+ {
+-  MetaStack *stack = workspace->display->stack;
++  MetaWorkspace *workspace;
++  MetaStack *stack = display->stack;
+   g_autoptr (GList) focusable_windows = NULL;
+   g_autoptr (GQueue) focus_candidates = NULL;
+   GList *l;
+ 
++  if (not_this_one && not_this_one->workspace)
++    workspace = not_this_one->workspace;
++  else
++    workspace = display->workspace_manager->active_workspace;
++
+    /* Go through all the focusable windows and try to focus them
+     * in order, waiting for a delay. The first one that replies to
+     * the request (in case of take focus windows) changing the display
+@@ -991,7 +997,7 @@ meta_window_x11_focus (MetaWindow *window,
+ 
+                   meta_x11_display_focus_the_no_focus_window (x11_display,
+                                                               timestamp);
+-                  maybe_focus_default_window (window->workspace, window,
++                  maybe_focus_default_window (window->display, window,
+                                               timestamp);
+                 }
+             }
+-- 
+2.22.0
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-07-17 20:20:20 UTC (rev 358105)
+++ PKGBUILD	2019-07-17 21:47:03 UTC (rev 358106)
@@ -4,7 +4,7 @@
 
 pkgname=mutter
 pkgver=3.32.2+40+gccab0f470
-pkgrel=1
+pkgrel=2
 pkgdesc="A window manager for GNOME"
 url="https://gitlab.gnome.org/GNOME/mutter"
 arch=(x86_64)
@@ -17,8 +17,10 @@
 groups=(gnome)
 install=mutter.install
 _commit=ccab0f470dcc556073754c8adf9413819d22cc14  # gnome-3-32
-source=("git+https://gitlab.gnome.org/GNOME/mutter.git#commit=$_commit")
-sha256sums=('SKIP')
+source=("git+https://gitlab.gnome.org/GNOME/mutter.git#commit=$_commit"
+        0001-window-x11-Focus-a-window-in-the-active-workspace-as.patch)
+sha256sums=('SKIP'
+            'a639f8fd35c82216b2b15ca49fe592a0618bfec681f88347ce75724a4402fcc7')
 
 pkgver() {
   cd $pkgname
@@ -33,6 +35,9 @@
 
   # required to build gala
   git cherry-pick -n bd7704f9e17e9554ad663386ef4fce1e16a56f08
+
+  # https://gitlab.gnome.org/GNOME/mutter/issues/687
+  patch -Np1 -i ../0001-window-x11-Focus-a-window-in-the-active-workspace-as.patch
 }
 
 build() {



More information about the arch-commits mailing list