void QWindowsWindow::releaseDC()
{
- if (m_hdc && !testFlag(DCFromBeginPaint)) {
+ if (m_hdc) {
ReleaseDC(handle(), m_hdc);
m_hdc = 0;
}
QRegion(qrectFromRECT(ps.rcPaint)));
EndPaint(hwnd, &ps);
} else {
- const HDC dc = BeginPaint(hwnd, &ps);
+ BeginPaint(hwnd, &ps);
const QRect updateRect = qrectFromRECT(ps.rcPaint);
- if (updateRect.size() == m_data.geometry.size()) {
- // Store DC for access by the backing store if it has the full size.
- releaseDC();
- setFlag(DCFromBeginPaint);
- m_hdc = dc;
- }
+
if (QWindowsContext::verboseIntegration)
qDebug() << __FUNCTION__ << this << window() << updateRect;
QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRegion(updateRect));
- if (testFlag(DCFromBeginPaint)) {
- clearFlag(DCFromBeginPaint);
- m_hdc = 0;
- }
EndPaint(hwnd, &ps);
}
return true;
enum Flags
{
- DCFromBeginPaint = 0x1,
+ AutoMouseCapture = 0x1, //! Automatic mouse capture on button press.
WithinSetParent = 0x2,
FrameDirty = 0x4, //! Frame outdated by setStyle, recalculate in next query.
OpenGLSurface = 0x10,
SizeGripOperation = 0x100,
FrameStrutEventsEnabled = 0x200,
SynchronousGeometryChangeEvent = 0x400,
- WithinSetStyle = 0x800,
- AutoMouseCapture = 0x1000 //! Automatic mouse capture on button press.
+ WithinSetStyle = 0x800
};
struct WindowData