[gtk: 1/6] window: Make sure we call gdk_wayland_surface_focus
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/6] window: Make sure we call gdk_wayland_surface_focus
- Date: Mon, 28 Feb 2022 17:29:10 +0000 (UTC)
commit 5dca6dce91b4413064c858ae011ea7b1e33421e2
Author: Guido Günther <agx sigxcpu org>
Date: Wed Aug 25 12:17:47 2021 +0200
window: Make sure we call gdk_wayland_surface_focus
When using xdg_activation this is responsible for submitting
the activation token / startup id to the compositor.
gtk/gtkwindow.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 9c58c36f1b..ec6bb6fd20 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5271,14 +5271,15 @@ gtk_window_present_with_time (GtkWindow *window,
#endif
timestamp = gtk_get_current_event_time ();
}
-
- gdk_toplevel_focus (GDK_TOPLEVEL (surface), timestamp);
}
else
{
priv->initial_timestamp = timestamp;
gtk_widget_show (widget);
}
+
+ g_assert (priv->surface != NULL);
+ gdk_toplevel_focus (GDK_TOPLEVEL (priv->surface), timestamp);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]