gdk/wayland: Perform xdg_activation on gdk_window_set_startup_id
This call has everything to perform activation as specified by the xdg_activation protocol, notably a surface to activate as opposed to gdk_notify_startup_complete(). Make activation happen here, so that the surface gets activated when its gets a startup ID assigned. (cherry-picked from commit 5aeabdb3d404579b5cab4fff1642ed116f745a8b)
This commit is contained in:
parent
a067938589
commit
f5a5480fe2
@ -4160,6 +4160,27 @@ static void
|
|||||||
gdk_wayland_window_set_startup_id (GdkWindow *window,
|
gdk_wayland_window_set_startup_id (GdkWindow *window,
|
||||||
const gchar *startup_id)
|
const gchar *startup_id)
|
||||||
{
|
{
|
||||||
|
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||||
|
GdkDisplay *display = gdk_window_get_display (window);
|
||||||
|
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||||
|
gchar *free_me = NULL;
|
||||||
|
|
||||||
|
if (!startup_id)
|
||||||
|
{
|
||||||
|
free_me = g_steal_pointer (&display_wayland->startup_notification_id);
|
||||||
|
startup_id = free_me;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_XDG_ACTIVATION
|
||||||
|
if (startup_id)
|
||||||
|
{
|
||||||
|
xdg_activation_v1_activate (display_wayland->xdg_activation,
|
||||||
|
startup_id,
|
||||||
|
impl->display_server.wl_surface);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
g_free (free_me);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user