return;
}
+ // skip if moving fast
+ if ((abs(win_rect.x - m_last_rect.x) > 1) ||
+ (abs(win_rect.y - m_last_rect.y) > 1))
+ {
+ m_last_rect = win_rect;
+ return;
+ }
+
// prevent frame redocking during resize
if (m_last_rect.GetSize() != win_rect.GetSize())
{
m_Amount=0;
m_MaxWidth=0;
m_MaxHeight=0;
+ m_lastWidth=0;
+ m_lastHeight=0;
#ifdef __WXGTK__
m_CanSetShape = false; // have to wait for window create event on GTK
#else
void OnSize(wxSizeEvent& event)
{
+ // We sometimes get surplus size events
+ if ((event.GetSize().GetWidth() == m_lastWidth) &&
+ (event.GetSize().GetHeight() == m_lastHeight))
+ {
+ event.Skip();
+ return;
+ }
+ m_lastWidth = event.GetSize().GetWidth();
+ m_lastHeight = event.GetSize().GetHeight();
+
SetTransparent(m_Amount);
m_Region.Intersect(0, 0, event.GetSize().GetWidth(),
event.GetSize().GetHeight());
int m_MaxWidth;
int m_MaxHeight;
bool m_CanSetShape;
+ int m_lastWidth,m_lastHeight;
wxRegion m_Region;