comparison src/statusicon/si_ui.c @ 456:2e0b55117302 trunk

[svn] - status icon plugin: better logic for KWin workaround
author giacomo
date Wed, 17 Jan 2007 08:52:04 -0800
parents f001b217c88b
children d124034ebea3
comparison
equal deleted inserted replaced
455:f001b217c88b 456:2e0b55117302
208 { 208 {
209 GdkScreen *screen = gdk_screen_get_default(); 209 GdkScreen *screen = gdk_screen_get_default();
210 if ( screen != NULL ) 210 if ( screen != NULL )
211 wmname = (gchar*)gdk_x11_screen_get_window_manager_name( screen ); 211 wmname = (gchar*)gdk_x11_screen_get_window_manager_name( screen );
212 } 212 }
213 else if ( ( size > 22 ) && ( !strcmp("KWin",wmname) ) ) 213 if ( ( size > 22 ) && ( wmname != NULL ) && ( !strcmp("KWin",wmname) ) )
214 size = 22; 214 size = 22;
215 215
216 si_pixbuf = gdk_pixbuf_new_from_xpm_data( (const char**)si_xpm ); 216 si_pixbuf = gdk_pixbuf_new_from_xpm_data( (const char**)si_xpm );
217 si_scaled_pixbuf = gdk_pixbuf_scale_simple( si_pixbuf , size , size , GDK_INTERP_BILINEAR ); 217 si_scaled_pixbuf = gdk_pixbuf_scale_simple( si_pixbuf , size , size , GDK_INTERP_BILINEAR );
218 gtk_image_set_from_pixbuf( GTK_IMAGE(image) , si_scaled_pixbuf ); 218 gtk_image_set_from_pixbuf( GTK_IMAGE(image) , si_scaled_pixbuf );