changeset 4130:c2039c3004d6

set windows masks in saner way
author Tomasz Mon <desowin@gmail.com>
date Fri, 28 Dec 2007 20:42:56 +0100
parents d9870d3e9550
children 1f4302ac4bba
files src/audacious/skin.c src/audacious/ui_skinned_window.c
diffstat 2 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/skin.c	Fri Dec 28 04:31:02 2007 -0600
+++ b/src/audacious/skin.c	Fri Dec 28 20:42:56 2007 +0100
@@ -1574,6 +1574,9 @@
     if(archive) del_directory(skin_path);
     g_free(skin_path);
 
+    gtk_widget_shape_combine_mask(mainwin, skin_get_mask(bmp_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0);
+    gtk_widget_shape_combine_mask(equalizerwin, skin_get_mask(bmp_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0);
+
     return TRUE;
 }
 
--- a/src/audacious/ui_skinned_window.c	Fri Dec 28 04:31:02 2007 -0600
+++ b/src/audacious/ui_skinned_window.c	Fri Dec 28 20:42:56 2007 +0100
@@ -107,6 +107,18 @@
     return FALSE;
 }
 
+static void
+ui_skinned_window_map(GtkWidget *widget)
+{
+    (* GTK_WIDGET_CLASS (parent)->map) (widget);
+
+    SkinnedWindow *window = SKINNED_WINDOW(widget);
+    if (window->type == WINDOW_MAIN)
+        gtk_widget_shape_combine_mask(widget, skin_get_mask(bmp_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0);
+    else if (window->type == WINDOW_EQ)
+        gtk_widget_shape_combine_mask(widget, skin_get_mask(bmp_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0);
+}
+
 static gboolean
 ui_skinned_window_motion_notify_event(GtkWidget *widget,
                                       GdkEventMotion *event)
@@ -147,12 +159,10 @@
         case WINDOW_MAIN:
             width = bmp_active_skin->properties.mainwin_width;
             height = bmp_active_skin->properties.mainwin_height;
-            gtk_widget_shape_combine_mask(widget, skin_get_mask(bmp_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0);
             break;
         case WINDOW_EQ:
             width = 275;
             height = 116;
-            gtk_widget_shape_combine_mask(widget, skin_get_mask(bmp_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0);
             break;
         case WINDOW_PLAYLIST:
             width = playlistwin_get_width();
@@ -225,6 +235,7 @@
     widget_class->expose_event = ui_skinned_window_expose;
     widget_class->focus_in_event = ui_skinned_window_focus_in;
     widget_class->focus_out_event = ui_skinned_window_focus_out;
+    widget_class->map = ui_skinned_window_map;
 }
 
 void