# HG changeset patch # User giacomo # Date 1169052413 28800 # Node ID f001b217c88b5988e908ec00335b05fdc5d72a6f # Parent 6c1c03111db4ad927bb961669b027d6489168cbe [svn] - status icon plugin: added a workaround to handle situations where KWin doesn't give a correct size for tray icons diff -r 6c1c03111db4 -r f001b217c88b ChangeLog --- a/ChangeLog Wed Jan 17 08:27:05 2007 -0800 +++ b/ChangeLog Wed Jan 17 08:46:53 2007 -0800 @@ -1,3 +1,10 @@ +2007-01-17 16:27:05 +0000 Giacomo Lozito + revision [992] + - use xmms_show_message for the about box + trunk/src/statusicon/si_ui.c | 33 ++++++++++++++++++++++++--------- + 1 file changed, 24 insertions(+), 9 deletions(-) + + 2007-01-17 11:34:44 +0000 Giacomo Lozito revision [990] - status icon plugin: use scroll wheel on the status icon to change volume diff -r 6c1c03111db4 -r f001b217c88b src/statusicon/si_ui.c --- a/src/statusicon/si_ui.c Wed Jan 17 08:27:05 2007 -0800 +++ b/src/statusicon/si_ui.c Wed Jan 17 08:46:53 2007 -0800 @@ -201,6 +201,17 @@ { GdkPixbuf *si_pixbuf, *si_scaled_pixbuf; gint size = GPOINTER_TO_INT(g_object_get_data( G_OBJECT(image) , "size" )); + static gchar *wmname = NULL; + + /* sometimes, KDE won't give the correct size-allocation; workaround this */ + if ( wmname == NULL ) + { + GdkScreen *screen = gdk_screen_get_default(); + if ( screen != NULL ) + wmname = (gchar*)gdk_x11_screen_get_window_manager_name( screen ); + } + else if ( ( size > 22 ) && ( !strcmp("KWin",wmname) ) ) + size = 22; si_pixbuf = gdk_pixbuf_new_from_xpm_data( (const char**)si_xpm ); si_scaled_pixbuf = gdk_pixbuf_scale_simple( si_pixbuf , size , size , GDK_INTERP_BILINEAR );