[maemo-commits] [maemo-commits] r12811 - in projects/haf/trunk/hildon-desktop: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Jul 24 16:21:28 EEST 2007
Author: moimart
Date: 2007-07-24 16:21:26 +0300 (Tue, 24 Jul 2007)
New Revision: 12811

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c
Log:
2007-07-24  Moises Martinez  <moises.martinez at nokia.com>

        * src/hn-app-switcher.c: (refresh_app_button), (refresh_buttons):
        - Set always icon geometry for windows.
        - When not in slot, take also into account the panel position.
        Fixes: NB#64082
	* ChangeLog updated.



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-07-24 13:03:46 UTC (rev 12810)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-07-24 13:21:26 UTC (rev 12811)
@@ -1,5 +1,12 @@
 2007-07-24  Moises Martinez  <moises.martinez at nokia.com>
 
+	* src/hn-app-switcher.c: (refresh_app_button), (refresh_buttons):
+	- Set always icon geometry for windows.
+	- When not in slot, take also into account the panel position.
+	Fixes: NB#64082
+
+2007-07-24  Moises Martinez  <moises.martinez at nokia.com>
+
 	* libhildondesktop/hildon-desktop-panel-window.c:
 	(hildon_desktop_panel_window_in_focus),
 	(hildon_desktop_panel_window_constructor):

Modified: projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c	2007-07-24 13:03:46 UTC (rev 12810)
+++ projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c	2007-07-24 13:21:26 UTC (rev 12811)
@@ -560,28 +560,25 @@
   const GList          *l, *children = hd_wm_entry_info_get_children (entry);
   gboolean              urgent = FALSE;
   HNAppButton          *app_button = HN_APP_BUTTON (priv->buttons[pos]);
-  gboolean 	       update_icon_geometry;
   gint		       panel_x = 0, panel_y = 0;
 
   GtkWidget *panel = gtk_widget_get_toplevel (GTK_WIDGET (app_switcher));
 
   gdk_window_get_position (panel->window, &panel_x, &panel_y);  
 
-  update_icon_geometry = 
-   (hn_app_button_get_last_entry_info (app_button) != entry) ? TRUE : FALSE;
-  
   /* deal with urgency flags */
   for (l = children; l != NULL; l = l->next)
   {
     HDWMEntryInfo *_info = HD_WM_ENTRY_INFO (l->data);	  
 	  
-    if (update_icon_geometry || app_switcher->priv->orientation_changed)	    
+    {	    
       hd_wm_window_set_icon_geometry (HD_WM_WINDOW (l->data),	    
 	      		              GTK_WIDGET (app_button)->allocation.x + panel_x,
 				      GTK_WIDGET (app_button)->allocation.y + panel_y,
 				      GTK_WIDGET (app_button)->allocation.width,
 				      GTK_WIDGET (app_button)->allocation.height,
 				      TRUE);
+    }
     /*
      * If the entry is urgent and the ignore flag is not set, the button
      * should blink
@@ -684,7 +681,10 @@
       gint real_width, real_height, real_x, real_y;
       real_x = 0;real_width = real_x; 
       GtkWidget *panel = gtk_widget_get_toplevel (GTK_WIDGET (app_switcher));
+      gint panel_x = 0, panel_y = 0;
 
+      gdk_window_get_position (panel->window, &panel_x, &panel_y);  
+
       /* Hack for setting the geometry in some place external in the panel.
        * Actually for us, this means the application switcher menu button 
        */
@@ -717,8 +717,8 @@
 
       for (iter = children; iter != NULL; iter = g_list_next (iter))
 	 hd_wm_window_set_icon_geometry (HD_WM_WINDOW (iter->data),	    
-		      		         GTK_WIDGET (app_switcher)->allocation.x,
-				         real_y,
+		      		         GTK_WIDGET (app_switcher)->allocation.x + panel_x,
+				         real_y + panel_y,
 				         GTK_WIDGET (app_switcher)->allocation.width,
 				         real_height,
 				         FALSE);


More information about the maemo-commits mailing list