Index: libnotify/notification.c =================================================================== --- libnotify/notification.c (revision 3009) +++ libnotify/notification.c (working copy) @@ -31,6 +31,7 @@ # define HAVE_STATUS_ICON # include #endif +#include #define CHECK_DBUS_VERSION(major, minor) \ (DBUS_MAJOR_VER > (major) || \ @@ -408,6 +409,13 @@ { GdkRectangle rect; +#if GTK_CHECK_VERSION(2,12,10) + { + guint32 xid = gtk_status_icon_get_x11_window_id(priv->status_icon); + notify_notification_set_hint_uint32(n, "window-xid", xid); + } +#endif + if (!gtk_status_icon_get_geometry(priv->status_icon, &screen, &rect, NULL)) { @@ -1003,7 +1011,33 @@ g_strdup(key), hint_value); } + /** + * notify_notification_set_hint_uint32: + * @notification: The notification. + * @key: The hint. + * @value: The hint's value. + * + * Sets a hint with an unsigned 32-bit integer value. + */ +void +notify_notification_set_hint_uint32(NotifyNotification *notification, + const gchar *key, guint value) +{ + GValue *hint_value; + + g_return_if_fail(notification != NULL); + g_return_if_fail(NOTIFY_IS_NOTIFICATION(notification)); + g_return_if_fail(key != NULL && *key != '\0'); + + hint_value = g_new0(GValue, 1); + g_value_init(hint_value, G_TYPE_UINT); + g_value_set_uint(hint_value, value); + g_hash_table_insert(notification->priv->hints, + g_strdup(key), hint_value); +} + +/** * notify_notification_set_hint_double: * @notification: The notification. * @key: The hint. Index: libnotify/notification.h =================================================================== --- libnotify/notification.h (revision 3009) +++ libnotify/notification.h (working copy) @@ -128,6 +128,8 @@ void notify_notification_set_hint_int32(NotifyNotification *notification, const gchar *key, gint value); +void notify_notification_set_hint_uint32(NotifyNotification *notification, + const gchar *key, guint value); void notify_notification_set_hint_double(NotifyNotification *notification, const gchar *key, gdouble value);