[banshee] [X11NotificationAreaBox] Make the area transparent (bgo#588255)



commit 7b4be9f88c278dafbd3f0d3bbcf29edf55dda1eb
Author: Christian Hergert <christian hergert gmail com>
Date:   Fri Mar 5 18:28:33 2010 +1100

    [X11NotificationAreaBox] Make the area transparent (bgo#588255)
    
    Signed-off-by: Alexander Kojevnikov <alexander kojevnikov com>

 .../X11NotificationAreaBox.cs                      |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs b/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs
index c165e6f..887b6b5 100644
--- a/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs
+++ b/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs
@@ -80,10 +80,13 @@ namespace Banshee.NotificationArea
             panel_size = 16;
             event_box.Add (icon);
 
+            event_box.AppPaintable = true;
             event_box.ButtonPressEvent += OnButtonPressEvent;
             event_box.EnterNotifyEvent += OnEnterNotifyEvent;
             event_box.LeaveNotifyEvent += OnLeaveNotifyEvent;
             event_box.ScrollEvent += OnMouseScroll;
+            event_box.ExposeEvent += OnExposeEvent;
+            event_box.GdkWindow.SetBackPixmap(null, true);
 
             event_box.ShowAll ();
         }
@@ -397,5 +400,14 @@ namespace Banshee.NotificationArea
 
             return result;
         }
+
+        [GLib.ConnectBefore]
+        private void OnExposeEvent (object o, ExposeEventArgs e)
+        {
+            Gtk.Widget widget = (Gtk.Widget)o;
+            Gdk.Rectangle area = e.Event.Area;
+
+            widget.GdkWindow.ClearArea(area.X, area.Y, area.Width, area.Height);
+        }
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]