]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/taskbarx11.cpp
aa const
[wxWidgets.git] / src / unix / taskbarx11.cpp
index 99ed4fb0306828f1a0202f5d94bcdfbbf2cc7269..cf64c408a6715b52cd1967a3150f6b4582c509a8 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
@@ -139,7 +140,7 @@ void wxTaskBarIconArea::SetTrayIcon(const wxBitmap& bmp)
     // determine suitable bitmap size:
     wxSize winsize(GetSize());
     wxSize bmpsize(m_bmp.GetWidth(), m_bmp.GetHeight());
-    wxSize iconsize(wxMin(winsize.x-2, bmpsize.x), wxMin(winsize.y-2, bmpsize.y));
+    wxSize iconsize(wxMin(winsize.x, bmpsize.x), wxMin(winsize.y, bmpsize.y));
 
     // rescale the bitmap to fit into the tray icon window:
     if (bmpsize != iconsize)
@@ -150,10 +151,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 +311,6 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
 {
     if (!m_iconWnd)
         return false;
-    wxSize size(m_iconWnd->GetClientSize());
-    m_iconWnd->PopupMenu(menu, size.x/2, size.y/2);
+    m_iconWnd->PopupMenu(menu);
     return true;
 }