]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/taskbarx11.cpp
Applied patch 1055774 from Paul Cornett for platforms
[wxWidgets.git] / src / unix / taskbarx11.cpp
index 759be00a01e04cc204b18d8d031ea081b054cfcf..cf94b215837d56a4b98e12ccc9658a1300b8301a 100644 (file)
@@ -32,6 +32,7 @@
 #include "wx/sizer.h"
 #include "wx/dcclient.h"
 #include "wx/log.h"
+#include "wx/image.h"
 
 #ifdef __VMS
 #pragma message disable nosimpint
 // ----------------------------------------------------------------------------
 
 #ifdef __WXGTK20__
-    #include "wx/gtk/taskbarpriv.h"
-#else
+    #include <gtk/gtk.h>
+    #if GTK_CHECK_VERSION(2,1,0)
+        #include "wx/gtk/taskbarpriv.h"
+        #define TASKBAR_ICON_AREA_BASE_INCLUDED
+    #endif
+#endif
+
+#ifndef TASKBAR_ICON_AREA_BASE_INCLUDED
     class WXDLLIMPEXP_ADV wxTaskBarIconAreaBase : public wxFrame
     {
     public:
@@ -150,10 +157,7 @@ void wxTaskBarIconArea::SetTrayIcon(const wxBitmap& bmp)
     }
 
     wxRegion region;
-    if (m_bmp.GetMask())
-        region.Union(m_bmp);
-    else
-        region.Union(0,0, iconsize.x, iconsize.y);
+    region.Union(m_bmp);
 
     // if the bitmap is smaller than the window, offset it:
     if (winsize != iconsize)
@@ -313,7 +317,6 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
 {
     if (!m_iconWnd)
         return false;
-    wxSize size(m_iconWnd->GetClientSize());
     m_iconWnd->PopupMenu(menu);
     return true;
 }