comparison src/statusicon/si_ui.c @ 2221:b4a2a7197c05

statusicon: quick workaround for Xfce4
author Eugene Zagidullin <e.asphyx@gmail.com>
date Fri, 07 Dec 2007 21:50:55 +0300
parents d7acad3d50e8
children 3e2ff1758809
comparison
equal deleted inserted replaced
2220:0cb173caf393 2221:b4a2a7197c05
338 if ( wmname == NULL ) 338 if ( wmname == NULL )
339 { 339 {
340 GdkScreen *screen = gdk_screen_get_default(); 340 GdkScreen *screen = gdk_screen_get_default();
341 if ( screen != NULL ) 341 if ( screen != NULL )
342 wmname = (gchar*)gdk_x11_screen_get_window_manager_name( screen ); 342 wmname = (gchar*)gdk_x11_screen_get_window_manager_name( screen );
343 } 343 AUDDBG("WM name: %s\n", wmname);
344 if ( ( size > 22 ) && ( wmname != NULL ) && ( !strcmp("KWin",wmname) ) ) 344 }
345 if ( ( size <= 1 || size > 22 ) && ( wmname != NULL ) && ( !strcmp("KWin",wmname) || !strcmp("Xfwm4",wmname) ) )
345 size = 22; 346 size = 22;
346 347
347 si_pixbuf = gdk_pixbuf_new_from_xpm_data( (const char**)si_xpm ); 348 si_pixbuf = gdk_pixbuf_new_from_xpm_data( (const char**)si_xpm );
348 si_scaled_pixbuf = gdk_pixbuf_scale_simple( si_pixbuf , size , size , GDK_INTERP_BILINEAR ); 349 si_scaled_pixbuf = gdk_pixbuf_scale_simple( si_pixbuf , size , size , GDK_INTERP_BILINEAR );
349 gtk_image_set_from_pixbuf( GTK_IMAGE(image) , si_scaled_pixbuf ); 350 gtk_image_set_from_pixbuf( GTK_IMAGE(image) , si_scaled_pixbuf );