forked from AuroraMiddleware/gtk
Merge branch 'startup-vs-xdg-activation' into 'main'
Startup tracking with xdg-activation See merge request GNOME/gtk!3883
This commit is contained in:
commit
68319afd23
@ -1040,7 +1040,7 @@ out:
|
||||
g_signal_connect_swapped (G_OBJECT (demo), "destroy", G_CALLBACK (g_application_quit), app);
|
||||
}
|
||||
else
|
||||
gtk_widget_show (GTK_WIDGET (window));
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
|
||||
if (autoquit)
|
||||
g_timeout_add_seconds (1, auto_quit, app);
|
||||
|
@ -871,7 +871,7 @@ activate (GApplication *app)
|
||||
|
||||
update_ui ();
|
||||
|
||||
gtk_widget_show (main_window);
|
||||
gtk_window_present (GTK_WINDOW (main_window));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2360,7 +2360,7 @@ activate (GApplication *app)
|
||||
model = (GMenuModel *)gtk_builder_get_object (builder, "new_style_context_menu_model");
|
||||
set_up_context_popover (widget, model);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (window));
|
||||
gtk_window_present (window);
|
||||
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
@ -854,6 +854,10 @@ gdk_wayland_display_notify_startup_complete (GdkDisplay *display,
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
char *free_this = NULL;
|
||||
|
||||
/* Will be signaled with focus activation */
|
||||
if (display_wayland->xdg_activation)
|
||||
return;
|
||||
|
||||
if (startup_id == NULL)
|
||||
{
|
||||
startup_id = free_this = display_wayland->startup_notification_id;
|
||||
|
@ -3474,6 +3474,7 @@ gdk_wayland_surface_focus (GdkSurface *surface,
|
||||
xdg_activation_v1_activate (display_wayland->xdg_activation,
|
||||
display_wayland->startup_notification_id,
|
||||
impl->display_server.wl_surface);
|
||||
gdk_wayland_display_set_startup_notification_id (GDK_DISPLAY (display_wayland), NULL);
|
||||
}
|
||||
else if (display_wayland->gtk_shell_version >= 3)
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user