summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_win.cpp
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-02-09 15:45:29 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-02-09 15:45:29 (GMT)
commita49a2ae399643afd30dd5d2df90ecb6d6325121a (patch)
tree5ac7bbece7c7ff90f9796430e4eaaff7728dfe29 /src/gui/kernel/qapplication_win.cpp
parentdadfdfaa320aa5951d8512428d59e762b0da79f3 (diff)
parent392123ef5432643d1047d1e1dd71512ec39d382d (diff)
downloadQt-a49a2ae399643afd30dd5d2df90ecb6d6325121a.zip
Qt-a49a2ae399643afd30dd5d2df90ecb6d6325121a.tar.gz
Qt-a49a2ae399643afd30dd5d2df90ecb6d6325121a.tar.bz2
Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6
Conflicts: src/gui/kernel/qapplication_win.cpp src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h
Diffstat (limited to 'src/gui/kernel/qapplication_win.cpp')
-rw-r--r--src/gui/kernel/qapplication_win.cpp28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 3355272..0a4869b 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -928,7 +928,11 @@ const QString qt_reg_winclass(QWidget *w) // register window class
uint style;
bool icon;
QString cname;
- if (flags & Qt::MSWindowsOwnDC) {
+ if (qt_widget_private(w)->isGLWidget) {
+ cname = QLatin1String("QGLWidget");
+ style = CS_DBLCLKS;
+ icon = true;
+ } else if (flags & Qt::MSWindowsOwnDC) {
cname = QLatin1String("QWidgetOwnDC");
style = CS_DBLCLKS;
#ifndef Q_WS_WINCE
@@ -1021,7 +1025,7 @@ const QString qt_reg_winclass(QWidget *w) // register window class
}
wc.hCursor = 0;
#ifndef Q_WS_WINCE
- wc.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
+ wc.hbrBackground = qt_widget_private(w)->isGLWidget ? 0 : (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
#else
wc.hbrBackground = 0;
#endif
@@ -3616,13 +3620,19 @@ bool QETWidget::translatePaintEvent(const MSG &msg)
return true;
setAttribute(Qt::WA_PendingUpdate, false);
- const QRegion dirtyInBackingStore(qt_dirtyRegion(this));
- // Make sure the invalidated region contains the region we're about to repaint.
- // BeginPaint will set the clip to the invalidated region and it is impossible
- // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient
- // as it may return an invalid context (especially on Windows Vista).
- if (!dirtyInBackingStore.isEmpty())
- InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false);
+
+ if (d_func()->isGLWidget) {
+ if (d_func()->usesDoubleBufferedGLContext)
+ InvalidateRect(internalWinId(), 0, false);
+ } else {
+ const QRegion dirtyInBackingStore(qt_dirtyRegion(this));
+ // Make sure the invalidated region contains the region we're about to repaint.
+ // BeginPaint will set the clip to the invalidated region and it is impossible
+ // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient
+ // as it may return an invalid context (especially on Windows Vista).
+ if (!dirtyInBackingStore.isEmpty())
+ InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false);
+ }
PAINTSTRUCT ps;
d_func()->hd = BeginPaint(internalWinId(), &ps);