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

Proposed by Marco Trevisan (Treviño)
Status: Merged
Merged at revision: d1a5a33cb6019c1349dea2d2ae5160950e2932d4
Proposed branch: ~3v1n0/ubuntu/+source/mutter:ubuntu/master
Merge into: ~ubuntu-desktop/ubuntu/+source/mutter:ubuntu/master
Diff against target: 954 lines (+459/-106)
18 files modified
NEWS (+30/-0)
clutter/clutter/clutter-device-manager.c (+1/-7)
clutter/clutter/evdev/clutter-input-device-evdev.c (+7/-7)
cogl/cogl/winsys/cogl-winsys-glx.c (+29/-29)
debian/changelog (+29/-0)
debian/patches/clutter-evdev-disable-mousekeys-with-Numlock-ON.patch (+64/-0)
debian/patches/clutter-x11-disable-mousekeys-with-Numlock-ON.patch (+85/-0)
debian/patches/compositor-Destroy-window-actors-list-on-destruction.patch (+63/-0)
debian/patches/meson-add-back-default_driver-option.patch (+1/-1)
debian/patches/series (+3/-0)
debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch (+23/-20)
meson.build (+1/-1)
src/backends/native/meta-renderer-native.c (+68/-25)
src/core/display.c (+1/-1)
src/core/keybindings.c (+2/-0)
src/core/startup-notification.c (+47/-10)
src/wayland/meta-wayland-outputs.c (+4/-4)
src/x11/meta-startup-notification-x11.c (+1/-1)
Reviewer Review Type Date Requested Status
Iain Lane Needs Fixing
Daniel van Vugt (community) Approve
Review via email: mp+366666@code.launchpad.net

Description of the change

Merge 3.32 with debian, fix scale computation crash.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Looks reasonable. Only one note:

(1) The change to clutter/clutter/clutter-device-manager.c is out of date already (missing https://gitlab.gnome.org/GNOME/mutter/merge_requests/552). So there is a slight risk without that second part.

review: Approve
fcdf97d... by Marco Trevisan (Treviño)

debian/patch: Destroy compositor window actors list on destruction

Fixes LP: #1813716

ca22053... by Marco Trevisan (Treviño)

debian/patches: Refresh indexes

Revision history for this message
Iain Lane (laney) wrote :

ca2205311 debian/patches: Refresh indexes
fcdf97d88 debian/patch: Destroy compositor window actors list on destruction
48a697817 randr-scaling: Fix a crash computing primary monitor scale

Nope, we'll get these via mutter 3.32.1-2 that I'm uploading to experimental.

review: Needs Fixing
Revision history for this message
Iain Lane (laney) wrote :

Merged up to d1a5a33cb6019c1349dea2d2ae5160950e2932d4, thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/NEWS b/NEWS
2index 720e28d..5606ee4 100644
3--- a/NEWS
4+++ b/NEWS
5@@ -1,3 +1,33 @@
6+3.32.1
7+======
8+* Fix fallback app menu on wayland [Florian; #493]
9+* Fix elogind support [Tom; !491]
10+* Fix startup notifications not timing out [Carlos; #501]
11+* Fix keyboard accessibility toggle from keys
12+ [Olivier, Carlos; !501, #529, !531]
13+* Fix touchscreen input on rotated displays [Carlos; #514]
14+* Work around hangul text input bug [Carlos; #1365]
15+* Fix blurry wallpaper scaling [Daniel; !505]
16+* Fix placement of window menu when using fractional scaling [Jan; #527]
17+* Fix repaint issues of offscreen effects on secondary monitors [Daniel; !511]
18+* Fix windows not getting focus after launch [Daniel; #505]
19+* Properly advertise support for 'underscan' property [Jonas; !507]
20+* Improve power-saving handling [Jonas; !506]
21+* Fix moving windows by super+touch [Jonas D.; !495]
22+* Misc. bug fixes and cleanups [Benjamin, Florian, Adam, Marco, Pablo,
23+ Erik, Jonas, Heiher, Pekka, Daniel, Olivier, Carlos; !478, !475, !480,
24+ !482, #490, !488, #491, #480, !477, !496, !492, !485, !515, !519, !521,
25+ !216, !538, #541, #523]
26+
27+Contributors:
28+ Jonas Ådahl, Pablo Barciela, Benjamin Berg, Tom Briden, Jonas Dreßler,
29+ Olivier Fourdan, Carlos Garnacho, Jan Alexander Steffens (heftig), Heiher,
30+ Adam Jackson, Erik Kurzinger, Florian Müllner, Pekka Paalanen,
31+ Marco Trevisan (Treviño), Daniel van Vugt
32+
33+Translators:
34+ Khaled Hosny [ar], Goran Vidović [hr], Daniel Mustieles [es]
35+
36 3.32.0
37 ======
38 * Fix deadlock when cancelling a theme sound [Andrea; !474]
39diff --git a/clutter/clutter/clutter-device-manager.c b/clutter/clutter/clutter-device-manager.c
40index 1800d01..c676384 100644
41--- a/clutter/clutter/clutter-device-manager.c
42+++ b/clutter/clutter/clutter-device-manager.c
43@@ -550,13 +550,7 @@ static gboolean
44 are_kbd_a11y_settings_equal (ClutterKbdA11ySettings *a,
45 ClutterKbdA11ySettings *b)
46 {
47- return (a->controls == b->controls &&
48- a->slowkeys_delay == b->slowkeys_delay &&
49- a->debounce_delay == b->debounce_delay &&
50- a->timeout_delay == b->timeout_delay &&
51- a->mousekeys_init_delay == b->mousekeys_init_delay &&
52- a->mousekeys_max_speed == b->mousekeys_max_speed &&
53- a->mousekeys_accel_time == b->mousekeys_accel_time);
54+ return (memcmp (a, b, sizeof (ClutterKbdA11ySettings)) == 0);
55 }
56
57 void
58diff --git a/clutter/clutter/evdev/clutter-input-device-evdev.c b/clutter/clutter/evdev/clutter-input-device-evdev.c
59index b52689e..2ac2e11 100644
60--- a/clutter/clutter/evdev/clutter-input-device-evdev.c
61+++ b/clutter/clutter/evdev/clutter-input-device-evdev.c
62@@ -1132,13 +1132,13 @@ clutter_input_device_evdev_process_kbd_a11y_event (ClutterEvent *e
63 if (event->key.flags & CLUTTER_EVENT_FLAG_INPUT_METHOD)
64 goto emit_event;
65
66- if (!(device_evdev->a11y_flags & CLUTTER_A11Y_KEYBOARD_ENABLED))
67- goto emit_event;
68-
69- if (event->type == CLUTTER_KEY_PRESS)
70- handle_enablekeys_press (event, device_evdev);
71- else
72- handle_enablekeys_release (event, device_evdev);
73+ if (device_evdev->a11y_flags & CLUTTER_A11Y_KEYBOARD_ENABLED)
74+ {
75+ if (event->type == CLUTTER_KEY_PRESS)
76+ handle_enablekeys_press (event, device_evdev);
77+ else
78+ handle_enablekeys_release (event, device_evdev);
79+ }
80
81 if (device_evdev->a11y_flags & CLUTTER_A11Y_MOUSE_KEYS_ENABLED)
82 {
83diff --git a/cogl/cogl/winsys/cogl-winsys-glx.c b/cogl/cogl/winsys/cogl-winsys-glx.c
84index 2623d02..235cfe8 100644
85--- a/cogl/cogl/winsys/cogl-winsys-glx.c
86+++ b/cogl/cogl/winsys/cogl-winsys-glx.c
87@@ -99,9 +99,9 @@ typedef struct _CoglOnscreenGLX
88 CoglOnscreenXlib _parent;
89 GLXDrawable glxwin;
90 uint32_t last_swap_vsync_counter;
91- gboolean pending_sync_notify;
92- gboolean pending_complete_notify;
93- gboolean pending_resize_notify;
94+ uint32_t pending_sync_notify;
95+ uint32_t pending_complete_notify;
96+ uint32_t pending_resize_notify;
97
98 GThread *swap_wait_thread;
99 GQueue *swap_wait_queue;
100@@ -347,35 +347,35 @@ flush_pending_notifications_cb (void *data,
101 {
102 CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
103 CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
104- gboolean pending_sync_notify = glx_onscreen->pending_sync_notify;
105- gboolean pending_complete_notify = glx_onscreen->pending_complete_notify;
106
107- /* If swap_region is called then notifying the sync event could
108- * potentially immediately queue a subsequent pending notify so
109- * we need to clear the flag before invoking the callback */
110- glx_onscreen->pending_sync_notify = FALSE;
111- glx_onscreen->pending_complete_notify = FALSE;
112-
113- if (pending_sync_notify)
114+ while (glx_onscreen->pending_sync_notify > 0 ||
115+ glx_onscreen->pending_complete_notify > 0 ||
116+ glx_onscreen->pending_resize_notify > 0)
117 {
118- CoglFrameInfo *info = g_queue_peek_head (&onscreen->pending_frame_infos);
119-
120- _cogl_onscreen_notify_frame_sync (onscreen, info);
121- }
122+ if (glx_onscreen->pending_sync_notify > 0)
123+ {
124+ CoglFrameInfo *info =
125+ g_queue_peek_head (&onscreen->pending_frame_infos);
126
127- if (pending_complete_notify)
128- {
129- CoglFrameInfo *info = g_queue_pop_head (&onscreen->pending_frame_infos);
130+ _cogl_onscreen_notify_frame_sync (onscreen, info);
131+ glx_onscreen->pending_sync_notify--;
132+ }
133
134- _cogl_onscreen_notify_complete (onscreen, info);
135+ if (glx_onscreen->pending_complete_notify > 0)
136+ {
137+ CoglFrameInfo *info =
138+ g_queue_pop_head (&onscreen->pending_frame_infos);
139
140- cogl_object_unref (info);
141- }
142+ _cogl_onscreen_notify_complete (onscreen, info);
143+ cogl_object_unref (info);
144+ glx_onscreen->pending_complete_notify--;
145+ }
146
147- if (glx_onscreen->pending_resize_notify)
148- {
149- _cogl_onscreen_notify_resize (onscreen);
150- glx_onscreen->pending_resize_notify = FALSE;
151+ if (glx_onscreen->pending_resize_notify > 0)
152+ {
153+ _cogl_onscreen_notify_resize (onscreen);
154+ glx_onscreen->pending_resize_notify--;
155+ }
156 }
157 }
158 }
159@@ -417,7 +417,7 @@ set_sync_pending (CoglOnscreen *onscreen)
160 NULL);
161 }
162
163- glx_onscreen->pending_sync_notify = TRUE;
164+ glx_onscreen->pending_sync_notify++;
165 }
166
167 static void
168@@ -440,7 +440,7 @@ set_complete_pending (CoglOnscreen *onscreen)
169 NULL);
170 }
171
172- glx_onscreen->pending_complete_notify = TRUE;
173+ glx_onscreen->pending_complete_notify++;
174 }
175
176 static void
177@@ -533,7 +533,7 @@ notify_resize (CoglContext *context,
178 NULL);
179 }
180
181- glx_onscreen->pending_resize_notify = TRUE;
182+ glx_onscreen->pending_resize_notify++;
183
184 if (!xlib_onscreen->is_foreign_xwin)
185 {
186diff --git a/debian/changelog b/debian/changelog
187index cd3e63e..93fea65 100644
188--- a/debian/changelog
189+++ b/debian/changelog
190@@ -1,3 +1,32 @@
191+mutter (3.32.1-1ubuntu1) UNRELEASED; urgency=medium
192+
193+ * Merge with debian
194+ - Update to 3.32.1 upstream version (LP: #1826936)
195+ - Fix applications aren't focused in Wayland session (LP: #1826176)
196+ - Fix crash on hotplugging a dock with a monitor (LP: #1826182)
197+ Remaining changes:
198+ + debian/control:
199+ - Update VCS flags to point to launchpad
200+ - Update maintainer to ubuntu
201+ + debian/gbp.conf: update branch to point to ubuntu/master
202+ + debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch:
203+ - X11: Add support for fractional scaling using Randr
204+ * d/p/compositor-Destroy-window-actors-list-on-destruction.patch:
205+ - compositor: Destroy window actors list on destruction (LP: #1813716)
206+ * d/p/x11-Add-support-for-fractional-scaling-using-Randr.patch:
207+ - Fixed crash on calculation of global scale (LP: #1826933)
208+ - Refreshed as per compositor code changes due to cherry-picked patch
209+
210+ -- Marco Trevisan (Treviño) <marco@ubuntu.com> Mon, 29 Apr 2019 16:08:24 -0500
211+
212+mutter (3.32.1-1) experimental; urgency=medium
213+
214+ * New upstream release
215+ * debian/patches: disable mousekeys with Numlock ON to match the
216+ documentation (cherry picked from the 3.32 branch)
217+
218+ -- Laurent Bigonville <bigon@debian.org> Mon, 22 Apr 2019 21:57:33 +0200
219+
220 mutter (3.32.0+git20190410-2) experimental; urgency=medium
221
222 [ Gunnar Hjalmarsson ]
223diff --git a/debian/patches/clutter-evdev-disable-mousekeys-with-Numlock-ON.patch b/debian/patches/clutter-evdev-disable-mousekeys-with-Numlock-ON.patch
224new file mode 100644
225index 0000000..5c70efe
226--- /dev/null
227+++ b/debian/patches/clutter-evdev-disable-mousekeys-with-Numlock-ON.patch
228@@ -0,0 +1,64 @@
229+From: Olivier Fourdan <ofourdan@redhat.com>
230+Date: Tue, 9 Apr 2019 13:39:59 +0200
231+Subject: clutter/evdev: disable mousekeys with Numlock ON
232+
233+The clutter/evdev implementation of mousekeys is designed after the
234+current implementation in X11, and works when the setting is enabled
235+regardless of the status of NumLock.
236+
237+The GNOME documentation on accessibility features states however that
238+mousekeys work only when NumLock is OFF:
239+
240+ https://help.gnome.org/users/gnome-help/stable/mouse-mousekeys.html
241+
242+Change the clutter/evdev implementation to match the documentation, i.e.
243+disable mousekeys when NumLock in ON so that switching NumLock ON
244+restores the numeric keypad behaviour.
245+
246+Closes: https://gitlab.gnome.org/GNOME/mutter/issues/530
247+(cherry picked from commit 471b61bd1400435b7af977c47c21b8fc747530d9)
248+---
249+ clutter/clutter/evdev/clutter-input-device-evdev.c | 16 ++++++++++++++++
250+ 1 file changed, 16 insertions(+)
251+
252+diff --git a/clutter/clutter/evdev/clutter-input-device-evdev.c b/clutter/clutter/evdev/clutter-input-device-evdev.c
253+index 2ac2e11..73072b4 100644
254+--- a/clutter/clutter/evdev/clutter-input-device-evdev.c
255++++ b/clutter/clutter/evdev/clutter-input-device-evdev.c
256+@@ -855,6 +855,14 @@ emulate_pointer_motion (ClutterInputDeviceEvdev *device,
257+ clutter_virtual_input_device_notify_relative_motion (device->mousekeys_virtual_device,
258+ time_us, dx_motion, dy_motion);
259+ }
260++static gboolean
261++is_numlock_active (ClutterInputDeviceEvdev *device)
262++{
263++ ClutterSeatEvdev *seat = device->seat;
264++ return xkb_state_mod_name_is_active (seat->xkb,
265++ "Mod2",
266++ XKB_STATE_MODS_LOCKED);
267++}
268+
269+ static void
270+ enable_mousekeys (ClutterInputDeviceEvdev *device)
271+@@ -1013,6 +1021,10 @@ handle_mousekeys_press (ClutterEvent *event,
272+ if (!(event->key.flags & CLUTTER_EVENT_FLAG_SYNTHETIC))
273+ stop_mousekeys_move (device);
274+
275++ /* Do not handle mousekeys if NumLock is ON */
276++ if (is_numlock_active (device))
277++ return FALSE;
278++
279+ /* Button selection */
280+ switch (event->key.keyval)
281+ {
282+@@ -1084,6 +1096,10 @@ static gboolean
283+ handle_mousekeys_release (ClutterEvent *event,
284+ ClutterInputDeviceEvdev *device)
285+ {
286++ /* Do not handle mousekeys if NumLock is ON */
287++ if (is_numlock_active (device))
288++ return FALSE;
289++
290+ switch (event->key.keyval)
291+ {
292+ case XKB_KEY_KP_0:
293diff --git a/debian/patches/clutter-x11-disable-mousekeys-with-Numlock-ON.patch b/debian/patches/clutter-x11-disable-mousekeys-with-Numlock-ON.patch
294new file mode 100644
295index 0000000..d33c9aa
296--- /dev/null
297+++ b/debian/patches/clutter-x11-disable-mousekeys-with-Numlock-ON.patch
298@@ -0,0 +1,85 @@
299+From: Olivier Fourdan <ofourdan@redhat.com>
300+Date: Tue, 9 Apr 2019 16:25:57 +0200
301+Subject: clutter/x11: disable mousekeys with Numlock ON
302+
303+GNOME documentation on accessibility features states that mousekeys
304+work only when NumLock is OFF:
305+
306+ https://help.gnome.org/users/gnome-help/stable/mouse-mousekeys.html
307+
308+Change the clutter/x11 implementation to match the documentation, i.e.
309+disable mousekeys when NumLock in ON so that switching NumLock ON
310+restores the numeric keypad behaviour.
311+
312+Closes: https://gitlab.gnome.org/GNOME/mutter/issues/530
313+(cherry picked from commit 251fa024c416b1507a8cb1c9115082be87d25632)
314+---
315+ clutter/clutter/x11/clutter-backend-x11.c | 20 ++++++++++++++++++++
316+ clutter/clutter/x11/clutter-xkb-a11y-x11.c | 9 +++++++--
317+ 2 files changed, 27 insertions(+), 2 deletions(-)
318+
319+diff --git a/clutter/clutter/x11/clutter-backend-x11.c b/clutter/clutter/x11/clutter-backend-x11.c
320+index 0ddd0f8..8c5ebc8 100644
321+--- a/clutter/clutter/x11/clutter-backend-x11.c
322++++ b/clutter/clutter/x11/clutter-backend-x11.c
323+@@ -54,6 +54,7 @@
324+ #include "clutter-main.h"
325+ #include "clutter-private.h"
326+ #include "clutter-settings-private.h"
327++#include "clutter-xkb-a11y-x11.h"
328+
329+ G_DEFINE_TYPE (ClutterBackendX11, clutter_backend_x11, CLUTTER_TYPE_BACKEND)
330+
331+@@ -276,6 +277,20 @@ clutter_backend_x11_create_device_manager (ClutterBackendX11 *backend_x11)
332+ _clutter_backend_add_event_translator (backend, translator);
333+ }
334+
335++static void
336++on_keymap_state_change (ClutterKeymapX11 *keymap_x11,
337++ gpointer data)
338++{
339++ ClutterDeviceManager *device_manager = CLUTTER_DEVICE_MANAGER (data);
340++ ClutterKbdA11ySettings kbd_a11y_settings;
341++
342++ /* On keymaps state change, just reapply the current settings, it'll
343++ * take care of enabling/disabling mousekeys based on NumLock state.
344++ */
345++ clutter_device_manager_get_kbd_a11y_settings (device_manager, &kbd_a11y_settings);
346++ clutter_device_manager_x11_apply_kbd_a11y_settings (device_manager, &kbd_a11y_settings);
347++}
348++
349+ static void
350+ clutter_backend_x11_create_keymap (ClutterBackendX11 *backend_x11)
351+ {
352+@@ -292,6 +307,11 @@ clutter_backend_x11_create_keymap (ClutterBackendX11 *backend_x11)
353+ backend = CLUTTER_BACKEND (backend_x11);
354+ translator = CLUTTER_EVENT_TRANSLATOR (backend_x11->keymap);
355+ _clutter_backend_add_event_translator (backend, translator);
356++
357++ g_signal_connect (backend_x11->keymap,
358++ "state-changed",
359++ G_CALLBACK (on_keymap_state_change),
360++ backend->device_manager);
361+ }
362+ }
363+
364+diff --git a/clutter/clutter/x11/clutter-xkb-a11y-x11.c b/clutter/clutter/x11/clutter-xkb-a11y-x11.c
365+index 6adde81..6b782c7 100644
366+--- a/clutter/clutter/x11/clutter-xkb-a11y-x11.c
367++++ b/clutter/clutter/x11/clutter-xkb-a11y-x11.c
368+@@ -241,8 +241,13 @@ clutter_device_manager_x11_apply_kbd_a11y_settings (ClutterDeviceManager *devi
369+ }
370+
371+ /* mouse keys */
372+- if (set_xkb_ctrl (desc, kbd_a11y_settings->controls,
373+- CLUTTER_A11Y_MOUSE_KEYS_ENABLED, XkbMouseKeysMask | XkbMouseKeysAccelMask))
374++ if (clutter_keymap_get_num_lock_state (CLUTTER_KEYMAP (backend_x11->keymap)))
375++ {
376++ /* Disable mousekeys when NumLock is ON */
377++ desc->ctrls->enabled_ctrls &= ~(XkbMouseKeysMask | XkbMouseKeysAccelMask);
378++ }
379++ else if (set_xkb_ctrl (desc, kbd_a11y_settings->controls,
380++ CLUTTER_A11Y_MOUSE_KEYS_ENABLED, XkbMouseKeysMask | XkbMouseKeysAccelMask))
381+ {
382+ gint mk_max_speed;
383+ gint mk_accel_time;
384diff --git a/debian/patches/compositor-Destroy-window-actors-list-on-destruction.patch b/debian/patches/compositor-Destroy-window-actors-list-on-destruction.patch
385new file mode 100644
386index 0000000..70205bc
387--- /dev/null
388+++ b/debian/patches/compositor-Destroy-window-actors-list-on-destruction.patch
389@@ -0,0 +1,63 @@
390+From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
391+Date: Mon, 29 Apr 2019 14:57:03 -0500
392+Subject: compositor: Destroy window actors list on destruction
393+
394+When the compositor is destroyed we should cleanup the list of window actors we
395+created and destroy them.
396+Since all the actors are added to the window_group or top_window_group we can
397+just destroy these containers (together with the feedback_group), and simply
398+free the windows list.
399+
400+This is particularly needed under X11 because before we destroy the display, we
401+might do some cleanups as detaching the surface pixmaps and freeing the damages
402+and if this happens at later point (for example when triggered by garbage
403+collector in gnome-shell), we might crash because the x11 dpy reference is
404+already gone.
405+
406+Destroying the window actors instead, ensures we avoid any further call to X11
407+related functions and that we release the actors XServer resources.
408+
409+Fixes https://gitlab.gnome.org/GNOME/mutter/issues/576
410+
411+Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1813716
412+Origin: https://gitlab.gnome.org/GNOME/mutter/merge_requests/557
413+Applied-Upstream: 3.32.2
414+---
415+ src/compositor/compositor.c | 17 +++++++++++++++++
416+ 1 file changed, 17 insertions(+)
417+
418+diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
419+index 0854a19..f47889f 100644
420+--- a/src/compositor/compositor.c
421++++ b/src/compositor/compositor.c
422+@@ -92,6 +92,10 @@ on_presented (ClutterStage *stage,
423+ ClutterFrameInfo *frame_info,
424+ MetaCompositor *compositor);
425+
426++static void
427++on_top_window_actor_destroyed (MetaWindowActor *window_actor,
428++ MetaCompositor *compositor);
429++
430+ static gboolean
431+ is_modal (MetaDisplay *display)
432+ {
433+@@ -134,6 +138,19 @@ meta_compositor_destroy (MetaCompositor *compositor)
434+ clutter_threads_remove_repaint_func (compositor->pre_paint_func_id);
435+ clutter_threads_remove_repaint_func (compositor->post_paint_func_id);
436+
437++ if (compositor->top_window_actor)
438++ {
439++ g_signal_handlers_disconnect_by_func (compositor->top_window_actor,
440++ on_top_window_actor_destroyed,
441++ compositor);
442++ compositor->top_window_actor = NULL;
443++ }
444++
445++ g_clear_pointer (&compositor->window_group, clutter_actor_destroy);
446++ g_clear_pointer (&compositor->top_window_group, clutter_actor_destroy);
447++ g_clear_pointer (&compositor->feedback_group, clutter_actor_destroy);
448++ g_clear_pointer (&compositor->windows, g_list_free);
449++
450+ if (compositor->have_x11_sync_object)
451+ meta_sync_ring_destroy ();
452+ }
453diff --git a/debian/patches/meson-add-back-default_driver-option.patch b/debian/patches/meson-add-back-default_driver-option.patch
454index b79207c..531b95f 100644
455--- a/debian/patches/meson-add-back-default_driver-option.patch
456+++ b/debian/patches/meson-add-back-default_driver-option.patch
457@@ -44,7 +44,7 @@ index 356d596..2ab83bd 100644
458 input: 'cogl-config.h.meson',
459 output: 'cogl-config.h',
460 diff --git a/meson.build b/meson.build
461-index 6ce9e59..bebe8eb 100644
462+index 1c86575..19aae12 100644
463 --- a/meson.build
464 +++ b/meson.build
465 @@ -210,6 +210,8 @@ if have_wayland_eglstream
466diff --git a/debian/patches/series b/debian/patches/series
467index 5e2b370..4c4ad35 100644
468--- a/debian/patches/series
469+++ b/debian/patches/series
470@@ -2,4 +2,7 @@ theme-use-gtk_render_icon_suface-to-paint-button-icon.patch
471 theme-load-icons-as-Gtk-does-with-fallback-and-RTL-suppor.patch
472 meson-add-back-default_driver-option.patch
473 debian/synaptics-support.patch
474+clutter-evdev-disable-mousekeys-with-Numlock-ON.patch
475+clutter-x11-disable-mousekeys-with-Numlock-ON.patch
476+compositor-Destroy-window-actors-list-on-destruction.patch
477 x11-Add-support-for-fractional-scaling-using-Randr.patch
478diff --git a/debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch b/debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch
479index 7717be1..6a1e047 100644
480--- a/debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch
481+++ b/debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch
482@@ -1,5 +1,5 @@
483 From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
484-Date: Wed, 3 Apr 2019 19:18:03 -0400
485+Date: Wed, 3 Apr 2019 17:18:03 -0600
486 Subject: x11-Add-support-for-fractional-scaling-using-Randr
487
488 Add scaling support using randr under x11.
489@@ -30,13 +30,13 @@ Forwarded: No, forwarding is in progress and planned though
490 src/backends/x11/meta-monitor-manager-xrandr.c | 485 ++++++++++++++++++-------
491 src/backends/x11/meta-monitor-manager-xrandr.h | 4 +-
492 src/backends/x11/meta-output-xrandr.c | 5 +-
493- src/compositor/compositor.c | 54 +++
494+ src/compositor/compositor.c | 57 +++
495 src/core/boxes-private.h | 4 +
496 src/core/boxes.c | 21 ++
497 src/core/window.c | 19 +
498 src/org.gnome.Mutter.DisplayConfig.xml | 5 +
499 src/tests/meta-monitor-manager-test.c | 14 +-
500- 28 files changed, 1358 insertions(+), 260 deletions(-)
501+ 28 files changed, 1361 insertions(+), 260 deletions(-)
502 create mode 100644 data/org.gnome.mutter.x11.gschema.xml.in
503
504 diff --git a/data/meson.build b/data/meson.build
505@@ -724,7 +724,7 @@ index cdb8f42..bf586ea 100644
506 meta_monitor_manager_get_capabilities (MetaMonitorManager *manager);
507
508 diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
509-index 2d898c7..a78fb37 100644
510+index 2d898c7..d8cf3ae 100644
511 --- a/src/backends/meta-monitor-manager.c
512 +++ b/src/backends/meta-monitor-manager.c
513 @@ -110,8 +110,18 @@ static gboolean
514@@ -838,7 +838,7 @@ index 2d898c7..a78fb37 100644
515
516 - if (!monitor || !meta_monitor_is_active (monitor))
517 - monitor = meta_monitor_manager_get_active_monitor (manager);
518-+ if (monitor)
519++ if (monitor && meta_monitor_is_active (monitor))
520 + {
521 + scale = calculate_monitor_scale (manager, monitor);
522 + if (meta_monitor_manager_is_scale_supported_by_other_monitors (manager,
523@@ -2832,12 +2832,12 @@ index 515389d..3bc7f0b 100644
524
525 tile_atom = XInternAtom (xdisplay, "TILE", FALSE);
526 diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
527-index 0854a19..e412784 100644
528+index f47889f..28f2b4f 100644
529 --- a/src/compositor/compositor.c
530 +++ b/src/compositor/compositor.c
531-@@ -92,6 +92,11 @@ on_presented (ClutterStage *stage,
532- ClutterFrameInfo *frame_info,
533- MetaCompositor *compositor);
534+@@ -96,6 +96,11 @@ static void
535+ on_top_window_actor_destroyed (MetaWindowActor *window_actor,
536+ MetaCompositor *compositor);
537
538 +static void
539 +on_redirected_monitor_changed (MetaWindow *window,
540@@ -2847,19 +2847,22 @@ index 0854a19..e412784 100644
541 static gboolean
542 is_modal (MetaDisplay *display)
543 {
544-@@ -134,6 +139,11 @@ meta_compositor_destroy (MetaCompositor *compositor)
545- clutter_threads_remove_repaint_func (compositor->pre_paint_func_id);
546- clutter_threads_remove_repaint_func (compositor->post_paint_func_id);
547+@@ -146,6 +151,14 @@ meta_compositor_destroy (MetaCompositor *compositor)
548+ compositor->top_window_actor = NULL;
549+ }
550
551 + if (compositor->unredirected_window)
552-+ g_signal_handlers_disconnect_by_func (compositor->unredirected_window,
553-+ on_redirected_monitor_changed,
554-+ compositor);
555++ {
556++ g_signal_handlers_disconnect_by_func (compositor->unredirected_window,
557++ on_redirected_monitor_changed,
558++ compositor);
559++ compositor->unredirected_window = NULL;
560++ }
561 +
562- if (compositor->have_x11_sync_object)
563- meta_sync_ring_destroy ();
564- }
565-@@ -635,16 +645,54 @@ meta_shape_cow_for_window (MetaCompositor *compositor,
566+ g_clear_pointer (&compositor->window_group, clutter_actor_destroy);
567+ g_clear_pointer (&compositor->top_window_group, clutter_actor_destroy);
568+ g_clear_pointer (&compositor->feedback_group, clutter_actor_destroy);
569+@@ -652,16 +665,54 @@ meta_shape_cow_for_window (MetaCompositor *compositor,
570 }
571 }
572
573@@ -2914,7 +2917,7 @@ index 0854a19..e412784 100644
574 meta_window_actor_set_unredirected (window_actor, FALSE);
575 }
576
577-@@ -654,6 +702,12 @@ set_unredirected_window (MetaCompositor *compositor,
578+@@ -671,6 +722,12 @@ set_unredirected_window (MetaCompositor *compositor,
579 if (compositor->unredirected_window != NULL)
580 {
581 MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (compositor->unredirected_window));
582diff --git a/meson.build b/meson.build
583index 6ce9e59..1c86575 100644
584--- a/meson.build
585+++ b/meson.build
586@@ -1,5 +1,5 @@
587 project('mutter', 'c',
588- version: '3.32.0',
589+ version: '3.32.1',
590 meson_version: '>= 0.48.0',
591 license: 'GPLv2+'
592 )
593diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
594index 086e8e4..dbfc97a 100644
595--- a/src/backends/native/meta-renderer-native.c
596+++ b/src/backends/native/meta-renderer-native.c
597@@ -3787,16 +3787,13 @@ gpu_kms_is_hardware_rendering (MetaRendererNative *renderer_native,
598 return data->secondary.is_hardware_rendering;
599 }
600
601-static MetaRendererNativeGpuData *
602-create_renderer_gpu_data_gbm (MetaRendererNative *renderer_native,
603- MetaGpuKms *gpu_kms,
604- GError **error)
605+static EGLDisplay
606+init_gbm_egl_display (MetaRendererNative *renderer_native,
607+ struct gbm_device *gbm_device,
608+ GError **error)
609 {
610 MetaEgl *egl = meta_renderer_native_get_egl (renderer_native);
611- struct gbm_device *gbm_device;
612 EGLDisplay egl_display;
613- int kms_fd;
614- MetaRendererNativeGpuData *renderer_gpu_data;
615
616 if (!meta_egl_has_extensions (egl, EGL_NO_DISPLAY, NULL,
617 "EGL_MESA_platform_gbm",
618@@ -3808,9 +3805,31 @@ create_renderer_gpu_data_gbm (MetaRendererNative *renderer_native,
619 g_set_error (error, G_IO_ERROR,
620 G_IO_ERROR_FAILED,
621 "Missing extension for GBM renderer: EGL_KHR_platform_gbm");
622- return NULL;
623+ return EGL_NO_DISPLAY;
624 }
625
626+ egl_display = meta_egl_get_platform_display (egl,
627+ EGL_PLATFORM_GBM_KHR,
628+ gbm_device, NULL, error);
629+ if (egl_display == EGL_NO_DISPLAY)
630+ return EGL_NO_DISPLAY;
631+
632+ if (!meta_egl_initialize (egl, egl_display, error))
633+ return EGL_NO_DISPLAY;
634+
635+ return egl_display;
636+}
637+
638+static MetaRendererNativeGpuData *
639+create_renderer_gpu_data_gbm (MetaRendererNative *renderer_native,
640+ MetaGpuKms *gpu_kms,
641+ GError **error)
642+{
643+ struct gbm_device *gbm_device;
644+ int kms_fd;
645+ MetaRendererNativeGpuData *renderer_gpu_data;
646+ g_autoptr (GError) local_error = NULL;
647+
648 kms_fd = meta_gpu_kms_get_fd (gpu_kms);
649
650 gbm_device = gbm_create_device (kms_fd);
651@@ -3822,26 +3841,25 @@ create_renderer_gpu_data_gbm (MetaRendererNative *renderer_native,
652 return NULL;
653 }
654
655- egl_display = meta_egl_get_platform_display (egl,
656- EGL_PLATFORM_GBM_KHR,
657- gbm_device, NULL, error);
658- if (egl_display == EGL_NO_DISPLAY)
659- {
660- gbm_device_destroy (gbm_device);
661- return NULL;
662- }
663-
664- if (!meta_egl_initialize (egl, egl_display, error))
665- return NULL;
666-
667 renderer_gpu_data = meta_create_renderer_native_gpu_data (gpu_kms);
668 renderer_gpu_data->renderer_native = renderer_native;
669 renderer_gpu_data->gbm.device = gbm_device;
670 renderer_gpu_data->mode = META_RENDERER_NATIVE_MODE_GBM;
671- renderer_gpu_data->egl_display = egl_display;
672
673- init_secondary_gpu_data (renderer_gpu_data);
674+ renderer_gpu_data->egl_display = init_gbm_egl_display (renderer_native,
675+ gbm_device,
676+ &local_error);
677+ if (renderer_gpu_data->egl_display == EGL_NO_DISPLAY)
678+ {
679+ g_debug ("GBM EGL init for %s failed: %s",
680+ meta_gpu_kms_get_file_path (gpu_kms),
681+ local_error->message);
682
683+ init_secondary_gpu_data_cpu (renderer_gpu_data);
684+ return renderer_gpu_data;
685+ }
686+
687+ init_secondary_gpu_data (renderer_gpu_data);
688 return renderer_gpu_data;
689 }
690
691@@ -4134,8 +4152,8 @@ on_gpu_added (MetaMonitorManager *monitor_manager,
692 }
693
694 static MetaGpuKms *
695-choose_primary_gpu (MetaMonitorManager *manager,
696- MetaRendererNative *renderer_native)
697+choose_primary_gpu_unchecked (MetaMonitorManager *manager,
698+ MetaRendererNative *renderer_native)
699 {
700 GList *gpus = meta_monitor_manager_get_gpus (manager);
701 GList *l;
702@@ -4184,6 +4202,28 @@ choose_primary_gpu (MetaMonitorManager *manager,
703 return NULL;
704 }
705
706+static MetaGpuKms *
707+choose_primary_gpu (MetaMonitorManager *manager,
708+ MetaRendererNative *renderer_native,
709+ GError **error)
710+{
711+ MetaGpuKms *gpu_kms;
712+ MetaRendererNativeGpuData *renderer_gpu_data;
713+
714+ gpu_kms = choose_primary_gpu_unchecked (manager, renderer_native);
715+ renderer_gpu_data = meta_renderer_native_get_gpu_data (renderer_native,
716+ gpu_kms);
717+ if (renderer_gpu_data->egl_display == EGL_NO_DISPLAY)
718+ {
719+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
720+ "The GPU %s chosen as primary is not supported by EGL.",
721+ meta_gpu_kms_get_file_path (gpu_kms));
722+ return NULL;
723+ }
724+
725+ return gpu_kms;
726+}
727+
728 static gboolean
729 meta_renderer_native_initable_init (GInitable *initable,
730 GCancellable *cancellable,
731@@ -4207,7 +4247,10 @@ meta_renderer_native_initable_init (GInitable *initable,
732 }
733
734 renderer_native->primary_gpu_kms = choose_primary_gpu (monitor_manager,
735- renderer_native);
736+ renderer_native,
737+ error);
738+ if (!renderer_native->primary_gpu_kms)
739+ return FALSE;
740
741 return TRUE;
742 }
743diff --git a/src/core/display.c b/src/core/display.c
744index e1477d3..0de99ed 100644
745--- a/src/core/display.c
746+++ b/src/core/display.c
747@@ -2236,7 +2236,7 @@ meta_display_get_tab_list (MetaDisplay *display,
748 MetaWindow *l_window = w->data;
749
750 if (l_window->wm_state_demands_attention &&
751- l_window->workspace != workspace &&
752+ !meta_window_located_on_workspace (l_window, workspace) &&
753 IN_TAB_CHAIN (l_window, type))
754 tab_list = g_list_prepend (tab_list, l_window);
755 }
756diff --git a/src/core/keybindings.c b/src/core/keybindings.c
757index 478d4d8..a99899f 100644
758--- a/src/core/keybindings.c
759+++ b/src/core/keybindings.c
760@@ -2214,6 +2214,8 @@ meta_keybindings_process_event (MetaDisplay *display,
761 {
762 case CLUTTER_BUTTON_PRESS:
763 case CLUTTER_BUTTON_RELEASE:
764+ case CLUTTER_TOUCH_BEGIN:
765+ case CLUTTER_TOUCH_END:
766 keys->overlay_key_only_pressed = FALSE;
767 return FALSE;
768
769diff --git a/src/core/startup-notification.c b/src/core/startup-notification.c
770index d2d0d13..4cd51ac 100644
771--- a/src/core/startup-notification.c
772+++ b/src/core/startup-notification.c
773@@ -37,7 +37,7 @@
774 * OpenOffice or whatever seems to stop launching - people
775 * might decide they need to launch it again.
776 */
777-#define STARTUP_TIMEOUT 15000000
778+#define STARTUP_TIMEOUT_MS 15000
779
780 enum
781 {
782@@ -61,12 +61,19 @@ enum
783
784 enum
785 {
786+ SEQ_COMPLETE,
787+ N_SEQ_SIGNALS
788+};
789+
790+enum
791+{
792 CHANGED,
793 N_SIGNALS
794 };
795
796 static guint sn_signals[N_SIGNALS];
797 static GParamSpec *sn_props[N_PROPS];
798+static guint seq_signals[N_SEQ_SIGNALS];
799 static GParamSpec *seq_props[N_SEQ_PROPS];
800
801 typedef struct
802@@ -106,12 +113,26 @@ G_DEFINE_TYPE_WITH_PRIVATE (MetaStartupSequence,
803
804 static void meta_startup_notification_ensure_timeout (MetaStartupNotification *sn);
805
806+static gboolean
807+meta_startup_notification_has_pending_sequences (MetaStartupNotification *sn)
808+{
809+ GSList *l;
810+
811+ for (l = sn->startup_sequences; l; l = l->next)
812+ {
813+ if (!meta_startup_sequence_get_completed (l->data))
814+ return TRUE;
815+ }
816+
817+ return FALSE;
818+}
819+
820 static void
821 meta_startup_notification_update_feedback (MetaStartupNotification *sn)
822 {
823 MetaDisplay *display = sn->display;
824
825- if (sn->startup_sequences != NULL)
826+ if (meta_startup_notification_has_pending_sequences (sn))
827 {
828 meta_topic (META_DEBUG_STARTUP,
829 "Setting busy cursor\n");
830@@ -239,6 +260,14 @@ meta_startup_sequence_class_init (MetaStartupSequenceClass *klass)
831 object_class->set_property = meta_startup_sequence_set_property;
832 object_class->get_property = meta_startup_sequence_get_property;
833
834+ seq_signals[SEQ_COMPLETE] =
835+ g_signal_new ("complete",
836+ META_TYPE_STARTUP_SEQUENCE,
837+ G_SIGNAL_RUN_LAST,
838+ G_STRUCT_OFFSET (MetaStartupSequenceClass, complete),
839+ NULL, NULL, NULL,
840+ G_TYPE_NONE, 0);
841+
842 seq_props[PROP_SEQ_ID] =
843 g_param_spec_string ("id",
844 "ID",
845@@ -317,7 +346,6 @@ meta_startup_sequence_get_timestamp (MetaStartupSequence *seq)
846 void
847 meta_startup_sequence_complete (MetaStartupSequence *seq)
848 {
849- MetaStartupSequenceClass *klass;
850 MetaStartupSequencePrivate *priv;
851
852 g_return_if_fail (META_IS_STARTUP_SEQUENCE (seq));
853@@ -327,10 +355,7 @@ meta_startup_sequence_complete (MetaStartupSequence *seq)
854 return;
855
856 priv->completed = TRUE;
857- klass = META_STARTUP_SEQUENCE_GET_CLASS (seq);
858-
859- if (klass->complete)
860- klass->complete (seq);
861+ g_signal_emit (seq, seq_signals[SEQ_COMPLETE], 0);
862 }
863
864 gboolean
865@@ -399,12 +424,22 @@ meta_startup_sequence_get_wmclass (MetaStartupSequence *seq)
866 return priv->wmclass;
867 }
868
869+static void
870+on_sequence_completed (MetaStartupSequence *seq,
871+ MetaStartupNotification *sn)
872+{
873+ meta_startup_notification_update_feedback (sn);
874+ g_signal_emit (sn, sn_signals[CHANGED], 0, seq);
875+}
876+
877 void
878 meta_startup_notification_add_sequence (MetaStartupNotification *sn,
879 MetaStartupSequence *seq)
880 {
881 sn->startup_sequences = g_slist_prepend (sn->startup_sequences,
882 g_object_ref (seq));
883+ g_signal_connect (seq, "complete",
884+ G_CALLBACK (on_sequence_completed), sn);
885
886 meta_startup_notification_ensure_timeout (sn);
887 meta_startup_notification_update_feedback (sn);
888@@ -425,10 +460,10 @@ collect_timed_out_foreach (void *element,
889
890 meta_topic (META_DEBUG_STARTUP,
891 "Sequence used %" G_GINT64_FORMAT " ms vs. %d max: %s\n",
892- elapsed, STARTUP_TIMEOUT,
893+ elapsed, STARTUP_TIMEOUT_MS,
894 meta_startup_sequence_get_id (sequence));
895
896- if (elapsed > STARTUP_TIMEOUT)
897+ if (elapsed > STARTUP_TIMEOUT_MS)
898 ctod->list = g_slist_prepend (ctod->list, sequence);
899 }
900
901@@ -440,7 +475,7 @@ startup_sequence_timeout (void *data)
902 GSList *l;
903
904 ctod.list = NULL;
905- ctod.now = g_get_monotonic_time ();
906+ ctod.now = g_get_monotonic_time () / 1000;
907 g_slist_foreach (sn->startup_sequences,
908 collect_timed_out_foreach,
909 &ctod);
910@@ -494,6 +529,8 @@ meta_startup_notification_remove_sequence (MetaStartupNotification *sn,
911 sn->startup_sequences = g_slist_remove (sn->startup_sequences, seq);
912 meta_startup_notification_update_feedback (sn);
913
914+ g_signal_handlers_disconnect_by_func (seq, on_sequence_completed, sn);
915+
916 if (sn->startup_sequences == NULL &&
917 sn->startup_sequence_timeout != 0)
918 {
919diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c
920index 7695d86..099e87a 100644
921--- a/src/wayland/meta-wayland-outputs.c
922+++ b/src/wayland/meta-wayland-outputs.c
923@@ -624,14 +624,14 @@ meta_xdg_output_manager_get_xdg_output (struct wl_client *client,
924 wl_resource_get_version (resource),
925 id);
926
927- wl_resource_set_implementation (xdg_output_resource,
928- &meta_xdg_output_interface,
929- NULL, meta_xdg_output_destructor);
930-
931 wayland_output = wl_resource_get_user_data (output);
932 if (!wayland_output)
933 return;
934
935+ wl_resource_set_implementation (xdg_output_resource,
936+ &meta_xdg_output_interface,
937+ wayland_output, meta_xdg_output_destructor);
938+
939 wayland_output->xdg_output_resources =
940 g_list_prepend (wayland_output->xdg_output_resources, xdg_output_resource);
941
942diff --git a/src/x11/meta-startup-notification-x11.c b/src/x11/meta-startup-notification-x11.c
943index d681492..99fcf45 100644
944--- a/src/x11/meta-startup-notification-x11.c
945+++ b/src/x11/meta-startup-notification-x11.c
946@@ -151,7 +151,7 @@ meta_startup_sequence_x11_new (SnStartupSequence *seq)
947 {
948 gint64 timestamp;
949
950- timestamp = sn_startup_sequence_get_timestamp (seq) * 1000;
951+ timestamp = sn_startup_sequence_get_timestamp (seq);
952 return g_object_new (META_TYPE_STARTUP_SEQUENCE_X11,
953 "id", sn_startup_sequence_get_id (seq),
954 "icon-name", sn_startup_sequence_get_icon_name (seq),

Subscribers

People subscribed via source and target branches