1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
1899 case WM_SETTINGCHANGE: |
1903 case WM_SETTINGCHANGE: |
1900 if ( QApplication::type() == QApplication::Tty ) |
1904 if ( QApplication::type() == QApplication::Tty ) |
1901 break; |
1905 break; |
1902 |
1906 |
1903 if (!msg.wParam) { |
1907 if (!msg.wParam) { |
|
1908 #ifdef Q_WS_WINCE |
|
1909 // On Windows CE, lParam parameter is a constant, not a char pointer. |
|
1910 if (msg.lParam == INI_INTL) { |
|
1911 #else |
1904 QString area = QString::fromWCharArray((wchar_t*)msg.lParam); |
1912 QString area = QString::fromWCharArray((wchar_t*)msg.lParam); |
1905 if (area == QLatin1String("intl")) { |
1913 if (area == QLatin1String("intl")) { |
|
1914 #endif |
1906 QLocalePrivate::updateSystemPrivate(); |
1915 QLocalePrivate::updateSystemPrivate(); |
1907 if (!widget->testAttribute(Qt::WA_SetLocale)) |
1916 if (!widget->testAttribute(Qt::WA_SetLocale)) |
1908 widget->dptr()->setLocale_helper(QLocale(), true); |
1917 widget->dptr()->setLocale_helper(QLocale(), true); |
1909 } |
1918 } |
1910 } |
1919 } |
3614 |
3623 |
3615 if (msg.message == WM_ERASEBKGND) |
3624 if (msg.message == WM_ERASEBKGND) |
3616 return true; |
3625 return true; |
3617 |
3626 |
3618 setAttribute(Qt::WA_PendingUpdate, false); |
3627 setAttribute(Qt::WA_PendingUpdate, false); |
3619 const QRegion dirtyInBackingStore(qt_dirtyRegion(this)); |
3628 |
3620 // Make sure the invalidated region contains the region we're about to repaint. |
3629 if (d_func()->isGLWidget) { |
3621 // BeginPaint will set the clip to the invalidated region and it is impossible |
3630 if (d_func()->usesDoubleBufferedGLContext) |
3622 // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient |
3631 InvalidateRect(internalWinId(), 0, false); |
3623 // as it may return an invalid context (especially on Windows Vista). |
3632 } else { |
3624 if (!dirtyInBackingStore.isEmpty()) |
3633 const QRegion dirtyInBackingStore(qt_dirtyRegion(this)); |
3625 InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false); |
3634 // Make sure the invalidated region contains the region we're about to repaint. |
|
3635 // BeginPaint will set the clip to the invalidated region and it is impossible |
|
3636 // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient |
|
3637 // as it may return an invalid context (especially on Windows Vista). |
|
3638 if (!dirtyInBackingStore.isEmpty()) |
|
3639 InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false); |
|
3640 } |
3626 PAINTSTRUCT ps; |
3641 PAINTSTRUCT ps; |
3627 d_func()->hd = BeginPaint(internalWinId(), &ps); |
3642 d_func()->hd = BeginPaint(internalWinId(), &ps); |
3628 |
3643 |
3629 const QRect updateRect(QPoint(ps.rcPaint.left, ps.rcPaint.top), |
3644 const QRect updateRect(QPoint(ps.rcPaint.left, ps.rcPaint.top), |
3630 QPoint(ps.rcPaint.right, ps.rcPaint.bottom)); |
3645 QPoint(ps.rcPaint.right, ps.rcPaint.bottom)); |