changeset 2237:c4cd92ff8d53

branch merge
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sun, 16 Dec 2007 21:00:58 +0900
parents ef61e0c66000 (current diff) 2769f4aaa2fd (diff)
children 240bdf781ad0
files
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/aosd/aosd_osd.c	Sun Dec 16 21:00:28 2007 +0900
+++ b/src/aosd/aosd_osd.c	Sun Dec 16 21:00:58 2007 +0900
@@ -179,6 +179,7 @@
 aosd_osd_create ( void )
 {
   gint max_width, layout_width, layout_height;
+  PangoRectangle ink;
   GdkScreen *screen = gdk_screen_get_default();
   gint pos_x = 0, pos_y = 0;
   gint pad_left = 0 , pad_right = 0 , pad_top = 0 , pad_bottom = 0;
@@ -228,7 +229,9 @@
   pango_layout_set_ellipsize( osd_data->pango_layout , PANGO_ELLIPSIZE_NONE );
   pango_layout_set_justify( osd_data->pango_layout , FALSE );
   pango_layout_set_width( osd_data->pango_layout , PANGO_SCALE * max_width );
-  pango_layout_get_pixel_size( osd_data->pango_layout , &layout_width , &layout_height );
+  pango_layout_get_pixel_extents( osd_data->pango_layout , &ink , NULL );
+  layout_width = ink.x + ink.width;
+  layout_height = ink.y + ink.height;
 
   /* osd position */
   switch ( osd_data->cfg_osd->position.placement )