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