Files
gtk3/debian/patches/gdk-wayland-Dispatch-GdkAppLaunchContext-activation-token.patch
Simon McVittie d03dca1d46 d/patches: Update to upstream gtk-3-24 branch commit 3.24.34-204-g2fcc114870
Windows- and macOS-specific changes excluded.
2022-11-15 11:28:51 +00:00

51 lines
2.1 KiB
Diff

From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 2 Jun 2022 23:04:40 +0200
Subject: gdk/wayland: Dispatch GdkAppLaunchContext activation token in its
own queue
Use a separate queue to dispatch the token object exclusively, just like we
do on the GdkSurface activation paths.
Backport-of: fb68600d88d4d334f7da7d079b106a1ef14503a6
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
Origin: upstream, 3.24.35, commit:7fa87abf8af6a71a02f59eb159c5650ad2a37727
---
gdk/wayland/gdkapplaunchcontext-wayland.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdk/wayland/gdkapplaunchcontext-wayland.c b/gdk/wayland/gdkapplaunchcontext-wayland.c
index 03f0058..f95b153 100644
--- a/gdk/wayland/gdkapplaunchcontext-wayland.c
+++ b/gdk/wayland/gdkapplaunchcontext-wayland.c
@@ -61,13 +61,17 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context
if (display->xdg_activation)
{
struct xdg_activation_token_v1 *token;
+ struct wl_event_queue *event_queue;
GdkSeat *seat;
GdkWindow *focus_window;
AppLaunchData app_launch_data = { 0 };
+ event_queue = wl_display_create_queue (display->wl_display);
+
seat = gdk_display_get_default_seat (GDK_DISPLAY (display));
focus_window = gdk_wayland_device_get_focus (gdk_seat_get_keyboard (seat));
token = xdg_activation_v1_get_activation_token (display->xdg_activation);
+ wl_proxy_set_queue ((struct wl_proxy *) token, event_queue);
xdg_activation_token_v1_add_listener (token,
&token_listener,
@@ -81,10 +85,11 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context
xdg_activation_token_v1_commit (token);
while (app_launch_data.token == NULL)
- wl_display_roundtrip (display->wl_display);
+ wl_display_dispatch_queue (display->wl_display, event_queue);
xdg_activation_token_v1_destroy (token);
id = app_launch_data.token;
+ wl_event_queue_destroy (event_queue);
}
else if (display->gtk_shell_version >= 3)
{