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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Jul 23 16:38:34 EEST 2007
Author: moimart
Date: 2007-07-23 16:38:32 +0300 (Mon, 23 Jul 2007)
New Revision: 12789

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

        * src/hn-app-switcher.c: (refresh_app_button):
        - Take into account position of the toplevel window.
        Fixes: NB#64024
	* ChangeLog updated.



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-07-23 12:55:29 UTC (rev 12788)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-07-23 13:38:32 UTC (rev 12789)
@@ -1,4 +1,10 @@
 2007-07-23  Moises Martinez  <moises.martinez at nokia.com>
+
+	* src/hn-app-switcher.c: (refresh_app_button):
+	- Take into account position of the toplevel window.
+	Fixes: NB#64024
+
+2007-07-23  Moises Martinez  <moises.martinez at nokia.com>
 	
 	* libhildonwm/hd-wm.c:
 	(hd_wm_x_window_is_watchable):

Modified: projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c	2007-07-23 12:55:29 UTC (rev 12788)
+++ projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c	2007-07-23 13:38:32 UTC (rev 12789)
@@ -561,7 +561,12 @@
   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;
   
@@ -572,8 +577,8 @@
 	  
     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,
-				      GTK_WIDGET (app_button)->allocation.y,
+	      		              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);


More information about the maemo-commits mailing list