2007-08-16 Xan Lopez <xan.lopez@nokia.com>
authorXan Lopez <xan.lopez@nokia.com>
Thu, 16 Aug 2007 15:09:02 +0000 (15:09 +0000)
committerXan Lopez <xan.lopez@nokia.com>
Thu, 16 Aug 2007 15:09:02 +0000 (15:09 +0000)
* src/hildon-banner.c: (hildon_banner_client_event): connect directly to
the client event and ignore it, since we use the delete event to close
after timeouts.

ChangeLog
src/hildon-banner.c

index b33d1c7..9e67895 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-16  Xan Lopez  <xan.lopez@nokia.com>
+
+       * src/hildon-banner.c: (hildon_banner_client_event): connect directly to
+       the client event and ignore it, since we use the delete event to close
+       after timeouts.
+
 2007-08-16  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
        * src/hildon-helper.c: Remove the bogus warning about color not being
index 32832a3..755bca0 100644 (file)
@@ -557,12 +557,25 @@ hildon_banner_map_event                         (GtkWidget *widget,
 }  
 
 #if defined(MAEMO_GTK)
-/* Do nothing for the delete event that will come from _GTK_DELETE_TEMPORARIES */
+
+static GdkAtom atom_temporaries = GDK_NONE;
+
+/* Do nothing for _GTK_DELETE_TEMPORARIES */
 static gint
-hildon_banner_delete_event                      (GtkWidget *widget,
-                                                 GdkEvent  *event)
+hildon_banner_client_event                      (GtkWidget *widget,
+                                                 GdkEventClient  *event)
 {
-    return TRUE;
+  gboolean handled = FALSE;
+
+  if (atom_temporaries == GDK_NONE)
+    atom_temporaries = gdk_atom_intern_static_string ("_GTK_DELETE_TEMPORARIES");
+
+  if (event->message_type == atom_temporaries)
+    {
+      handled = TRUE;
+    }
+
+  return handled;
 }
 #endif
 
@@ -663,7 +676,7 @@ hildon_banner_class_init                        (HildonBannerClass *klass)
     widget_class->map_event = hildon_banner_map_event;
     widget_class->realize = hildon_banner_realize;
 #if defined(MAEMO_GTK)
-    widget_class->delete_event = hildon_banner_delete_event;
+    widget_class->client_event = hildon_banner_client_event;
 #endif
 
     /* Install properties.