2006-05-22 Johan Bilien <johan.bilien@nokia.com>
authorJohan Bilien <johan.bilien@nokia.com>
Mon, 22 May 2006 16:44:28 +0000 (16:44 +0000)
committerJohan Bilien <johan.bilien@nokia.com>
Mon, 22 May 2006 16:44:28 +0000 (16:44 +0000)
* hildon-widgets/hildon-window.c
(hildon_window_vbox_expose_event): This function has been
removed, now the window has the responsability of painting the
toolbar, because it has that space allocated.
(hildon_window_init): we do not have to connect the
hildon_window_vbox_expose_event function to the expose event of
the toolbar vbox anymore.
(hildon_window_expose): Added the call to paint_toolbar, as we can
see in the allocation function the toolbar decorators are
responsability of the window, and gdk was not sending the proper
events to the vbox because that space is not its responsability.
(hildon_window_remove_toolbar): We don't need a queue_draw here
because we have another call in the expose function when the size
of the container has been changed.

NB#29461

ChangeLog
hildon-widgets/hildon-window.c

index 173d866..910c75a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2006-05-22  Johan Bilien  <johan.bilien@nokia.com>
+
+       * hildon-widgets/hildon-window.c
+       (hildon_window_vbox_expose_event): This function has been
+       removed, now the window has the responsability of painting the
+       toolbar, because it has that space allocated.
+       (hildon_window_init): we do not have to connect the
+       hildon_window_vbox_expose_event function to the expose event of
+       the toolbar vbox anymore.
+       (hildon_window_expose): Added the call to paint_toolbar, as we can
+       see in the allocation function the toolbar decorators are
+       responsability of the window, and gdk was not sending the proper
+       events to the vbox because that space is not its responsability.
+       (hildon_window_remove_toolbar): We don't need a queue_draw here
+       because we have another call in the expose function when the size
+       of the container has been changed.
+
+       NB#29461
+
 2006-05-21  Luc Pionchon  <luc.pionchon@nokia.com>
 
        Removed hildon-insert-object-dialog NB#8015
index da698d6..5902348 100644 (file)
@@ -148,11 +148,6 @@ hildon_window_notify (GObject *gobject, GParamSpec *param);
 static void
 hildon_window_is_topmost_notify (HildonWindow *window);
 
-static gboolean 
-hildon_window_vbox_expose_event (GtkWidget *vbox,
-                                 GdkEventExpose *event,
-                                 gpointer window);
-
 static gboolean
 hildon_window_toggle_menu (HildonWindow * self);
 
@@ -327,11 +322,6 @@ hildon_window_init (HildonWindow * self)
     priv->fullscreen = FALSE;
    
     priv->program = NULL;
-
-    /* Handle the drawing of the vbox (add the pixmap borders) */
-    g_signal_connect (G_OBJECT (self->priv->vbox), "expose-event",
-                      G_CALLBACK (hildon_window_vbox_expose_event),
-                      self);
     
     /* We need to track the root window _MB_CURRENT_APP_WINDOW property */
     gdk_window_set_events (gdk_get_default_root_window (),
@@ -510,6 +500,9 @@ hildon_window_expose (GtkWidget * widget, GdkEventExpose * event)
     g_list_foreach (box->children, visible_toolbars, 
             &currently_visible_toolbars);
 
+    paint_toolbar (widget, box,
+                   event, priv->fullscreen);
+
     if (!HILDON_WINDOW (widget)->priv->fullscreen)
     {
 
@@ -774,35 +767,6 @@ hildon_window_destroy (GtkObject *obj)
 }
 
 
-
-static gboolean 
-hildon_window_vbox_expose_event (GtkWidget *vbox,
-                                 GdkEventExpose *event,
-                                 gpointer window)
-{
-    HildonWindowPrivate *priv = HILDON_WINDOW (window)->priv;
-
-    hildon_window_get_borders (HILDON_WINDOW(window));
-
-    event->area.x -= priv->toolbar_borders->left;
-    event->area.y -= priv->toolbar_borders->top;
-    event->area.width += (priv->toolbar_borders->left + 
-                          priv->toolbar_borders->right);
-    event->area.height += (priv->toolbar_borders->top + 
-                           priv->toolbar_borders->bottom);
-
-    paint_toolbar (GTK_WIDGET (window), GTK_BOX (vbox),
-            event, priv->fullscreen);
-    
-    GTK_WIDGET_CLASS (G_TYPE_INSTANCE_GET_CLASS (vbox, GTK_TYPE_VBOX, GtkVBox))
-            ->expose_event (vbox, event);
-    
-    event->area = GTK_WIDGET(window)->allocation;
-
-
-    return TRUE;
-}
-
 static void
 hildon_window_notify (GObject *gobject, GParamSpec *param)
 {