Merge ~3v1n0/ubuntu/+source/mutter:ubuntu/bionic into ~ubuntu-desktop/ubuntu/+source/mutter:ubuntu/bionic

Proposed by Marco Trevisan (Treviño)
Status: Merged
Merged at revision: d512c1b736b6c18ef3f85407e554dfe03c0b0224
Proposed branch: ~3v1n0/ubuntu/+source/mutter:ubuntu/bionic
Merge into: ~ubuntu-desktop/ubuntu/+source/mutter:ubuntu/bionic
Diff against target: 98 lines (+70/-0)
3 files modified
debian/changelog (+1/-0)
debian/patches/series (+1/-0)
debian/patches/window-x11-Focus-a-window-in-the-active-workspace-as-take.patch (+68/-0)
Reviewer Review Type Date Requested Status
Ubuntu Desktop Pending
Review via email: mp+370304@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index a7cee5b..c2545c2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,7 @@ mutter (3.28.4-0ubuntu18.04.2) bionic; urgency=medium
20 d/p/window-x11-Don-t-double-check-for-unmanaging-windows.patch,20 d/p/window-x11-Don-t-double-check-for-unmanaging-windows.patch,
21 d/p/window-x11-Focus-the-default-window-with-delay-while-wait.patch,21 d/p/window-x11-Focus-the-default-window-with-delay-while-wait.patch,
22 d/p/window-x11-Use-any-focusable-window-as-fallback-delayed-f.patch,22 d/p/window-x11-Use-any-focusable-window-as-fallback-delayed-f.patch,
23 d/p/window-x11-Focus-a-window-in-the-active-workspace-as-take.patch,
23 d/p/workspace-Focus-only-ancestors-that-are-focusable.patch:24 d/p/workspace-Focus-only-ancestors-that-are-focusable.patch:
24 - Workspace: Take-Input windows focus fixes (LP: #1791574)25 - Workspace: Take-Input windows focus fixes (LP: #1791574)
25 * debian/libmutter-2-0.symbols: Update with new symbols26 * debian/libmutter-2-0.symbols: Update with new symbols
diff --git a/debian/patches/series b/debian/patches/series
index 8165334..094e978 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,6 +20,7 @@ window-x11-Don-t-double-check-for-unmanaging-windows.patch
20window-x11-Accept-any-focusable-window-as-fallback-focus.patch20window-x11-Accept-any-focusable-window-as-fallback-focus.patch
21stack-Add-a-function-to-get-a-sorted-list-of-focus-candid.patch21stack-Add-a-function-to-get-a-sorted-list-of-focus-candid.patch
22window-x11-Use-any-focusable-window-as-fallback-delayed-f.patch22window-x11-Use-any-focusable-window-as-fallback-delayed-f.patch
23window-x11-Focus-a-window-in-the-active-workspace-as-take.patch
23lp1763892-a-renderer-native-Add-hardware-presentation-timing.patch24lp1763892-a-renderer-native-Add-hardware-presentation-timing.patch
24lp1763892-b-renderer-native-Advertise-_FEATURE_SWAP_THROTTLE.patch25lp1763892-b-renderer-native-Advertise-_FEATURE_SWAP_THROTTLE.patch
25debian/synaptics-support.patch26debian/synaptics-support.patch
diff --git a/debian/patches/window-x11-Focus-a-window-in-the-active-workspace-as-take.patch b/debian/patches/window-x11-Focus-a-window-in-the-active-workspace-as-take.patch
26new file mode 10064427new file mode 100644
index 0000000..7a12ac5
--- /dev/null
+++ b/debian/patches/window-x11-Focus-a-window-in-the-active-workspace-as-take.patch
@@ -0,0 +1,68 @@
1From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
2Date: Wed, 17 Jul 2019 01:13:48 +0200
3Subject: window-x11: Focus a window in the active workspace as take-focus
4 fallback
5
6Starting with commit 2db94e2e we try to focus a fallback default focus window
7if no take-focus window candidate gets the input focus when we request it and
8we limit the focus candidates to the current window's workspace.
9
10However, if the window is unmanaging, the workspace might be unset, and we could
11end up in deferencing a NULL pointer causing a crash.
12
13So, in case the window's workspace is unset, just use the currently active
14workspace for the display.
15
16Closes https://gitlab.gnome.org/GNOME/mutter/issues/687
17
18https://gitlab.gnome.org/GNOME/mutter/merge_requests/688
19
20(cherry picked from commit 5ca0ef078d39548edda1a97e9066d44aa8f38108)
21
22Origin: https://gitlab.gnome.org/GNOME/mutter/merge_requests/688
23Applied-Upstream: 3.28.5
24Bug-Ubuntu: https://bugs.launchpad.net/bugs/1791574
25Bug-GNOME: https://gitlab.gnome.org/GNOME/mutter/issues/687
26---
27 src/x11/window-x11.c | 16 +++++++++++-----
28 1 file changed, 11 insertions(+), 5 deletions(-)
29
30diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
31index 60b121f..7ca51da 100644
32--- a/src/x11/window-x11.c
33+++ b/src/x11/window-x11.c
34@@ -834,15 +834,21 @@ meta_window_x11_maybe_focus_delayed (MetaWindow *window,
35 }
36
37 static void
38-maybe_focus_default_window (MetaWorkspace *workspace,
39- MetaWindow *not_this_one,
40- guint32 timestamp)
41+maybe_focus_default_window (MetaScreen *screen,
42+ MetaWindow *not_this_one,
43+ guint32 timestamp)
44 {
45- MetaStack *stack = workspace->screen->stack;
46+ MetaWorkspace *workspace;
47+ MetaStack *stack = screen->stack;
48 g_autoptr (GList) focusable_windows = NULL;
49 g_autoptr (GQueue) focus_candidates = NULL;
50 GList *l;
51
52+ if (not_this_one && not_this_one->workspace)
53+ workspace = not_this_one->workspace;
54+ else
55+ workspace = screen->active_workspace;
56+
57 /* Go through all the focusable windows and try to focus them
58 * in order, waiting for a delay. The first one that replies to
59 * the request (in case of take focus windows) changing the display
60@@ -936,7 +942,7 @@ meta_window_x11_focus (MetaWindow *window,
61 meta_display_focus_the_no_focus_window (window->display,
62 window->screen,
63 timestamp);
64- maybe_focus_default_window (window->workspace, window,
65+ maybe_focus_default_window (window->screen, window,
66 timestamp);
67 }
68 }

Subscribers

People subscribed via source and target branches