mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-08 03:30:17 +00:00
window: Set a _DBUS_APPLICATION_ID X11 window property
This will allow gnome-shell to reference it.
This commit is contained in:
parent
ff38dda9a8
commit
9c52a73c21
@ -2681,6 +2681,7 @@ gtk_window_set_application (GtkWindow *window,
|
|||||||
GtkApplication *application)
|
GtkApplication *application)
|
||||||
{
|
{
|
||||||
GtkWindowPrivate *priv;
|
GtkWindowPrivate *priv;
|
||||||
|
GdkWindow *gdkwindow;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||||
|
|
||||||
@ -2700,6 +2701,22 @@ gtk_window_set_application (GtkWindow *window,
|
|||||||
|
|
||||||
g_object_notify (G_OBJECT (window), "application");
|
g_object_notify (G_OBJECT (window), "application");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_X11
|
||||||
|
gdkwindow = gtk_widget_get_window (GTK_WIDGET (window));
|
||||||
|
if (gdkwindow)
|
||||||
|
{
|
||||||
|
if (GDK_IS_X11_WINDOW (gdkwindow))
|
||||||
|
{
|
||||||
|
const char *id;
|
||||||
|
if (application)
|
||||||
|
id = g_application_get_application_id ((GApplication*)application);
|
||||||
|
else
|
||||||
|
id = NULL;
|
||||||
|
gdk_x11_window_set_utf8_property (gdkwindow, "_DBUS_APPLICATION_ID", id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -5224,6 +5241,8 @@ gtk_window_realize (GtkWidget *widget)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
gtk_window_set_application (window, gtk_window_get_application (window));
|
||||||
|
|
||||||
/* Icons */
|
/* Icons */
|
||||||
gtk_window_realize_icon (window);
|
gtk_window_realize_icon (window);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user