release update region as soon as we finished painting the window instead of keeping it indefinitely (bug 1819635)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4506,6 +4506,10 @@ bool wxWindowMSW::HandlePaint()
|
|||||||
eventNc.SetEventObject(this);
|
eventNc.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(eventNc);
|
GetEventHandler()->ProcessEvent(eventNc);
|
||||||
|
|
||||||
|
// don't keep an HRGN we don't need any longer (GetUpdateRegion() can only
|
||||||
|
// be called from inside the event handlers called above)
|
||||||
|
m_updateRegion.Clear();
|
||||||
|
|
||||||
return processed;
|
return processed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4551,20 +4555,29 @@ void wxWindowMSW::OnEraseBackground(wxEraseEvent& event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetBackgroundStyle() == wxBG_STYLE_CUSTOM )
|
switch ( GetBackgroundStyle() )
|
||||||
{
|
{
|
||||||
// don't skip the event here, custom background means that the app
|
default:
|
||||||
// is drawing it itself in its OnPaint(), so don't draw it at all
|
wxFAIL_MSG( _T("Unknown background style") );
|
||||||
// now to avoid flicker
|
// fall through
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
case wxBG_STYLE_SYSTEM:
|
||||||
|
case wxBG_STYLE_COLOUR:
|
||||||
|
// do default background painting
|
||||||
|
if ( !DoEraseBackground(GetHdcOf(*event.GetDC())) )
|
||||||
|
{
|
||||||
|
// let the system paint the background
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
// do default background painting
|
case wxBG_STYLE_CUSTOM:
|
||||||
if ( !DoEraseBackground(GetHdcOf(*event.GetDC())) )
|
// don't skip the event here, custom background means that the app
|
||||||
{
|
// is drawing it itself in its OnPaint(), so don't draw it at all
|
||||||
// let the system paint the background
|
// now to avoid flicker
|
||||||
event.Skip();
|
return;
|
||||||
|
|
||||||
|
case wxBG_STYLE_TRANSPARENT:
|
||||||
|
event.Skip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5935,10 +5948,18 @@ WXWORD wxCharCodeWXToMSW(int wxk, bool *isVirtual)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ( isVirtual )
|
// check to see if its one of the OEM key codes.
|
||||||
*isVirtual = false;
|
BYTE vks = LOBYTE(VkKeyScan(wxk));
|
||||||
vk = (WXWORD)wxk;
|
if ( vks != -1 )
|
||||||
break;
|
{
|
||||||
|
vk = vks;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( isVirtual )
|
||||||
|
*isVirtual = false;
|
||||||
|
vk = (WXWORD)wxk;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return vk;
|
return vk;
|
||||||
|
Reference in New Issue
Block a user