[libgd] notification: Use gtk_window_(un)register_window



commit 3dbcd6affeccbe3bd4af4ac37448d3cb4c0ef557
Author: Kalev Lember <kalevlember gmail com>
Date:   Fri Feb 27 17:48:54 2015 +0100

    notification: Use gtk_window_(un)register_window
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710297

 libgd/gd-notification.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgd/gd-notification.c b/libgd/gd-notification.c
index 6bf2ef0..adb51ea 100644
--- a/libgd/gd-notification.c
+++ b/libgd/gd-notification.c
@@ -214,14 +214,14 @@ gd_notification_realize (GtkWidget *widget)
   window = gdk_window_new (gtk_widget_get_parent_window (widget),
                            &attributes, attributes_mask);
   gtk_widget_set_window (widget, window);
-  gdk_window_set_user_data (window, notification);
+  gtk_widget_register_window (widget, window);
 
   attributes.x = 0;
   attributes.y = attributes.height + priv->animate_y;
   attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK | GDK_VISIBILITY_NOTIFY_MASK;
 
   priv->bin_window = gdk_window_new (window, &attributes, attributes_mask);
-  gdk_window_set_user_data (priv->bin_window, notification);
+  gtk_widget_register_window (widget, priv->bin_window);
 
   child = gtk_bin_get_child (bin);
   if (child)
@@ -237,7 +237,7 @@ gd_notification_unrealize (GtkWidget *widget)
   GdNotification *notification = GD_NOTIFICATION (widget);
   GdNotificationPrivate *priv = notification->priv;
 
-  gdk_window_set_user_data (priv->bin_window, NULL);
+  gtk_widget_unregister_window (widget, priv->bin_window);
   gdk_window_destroy (priv->bin_window);
   priv->bin_window = NULL;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]