Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qapplication_win.cpp

    r651 r769  
    116116#endif
    117117
     118#include "private/qwinnativepangesturerecognizer_win_p.h"
     119
    118120#ifndef WM_TOUCH
    119121#  define WM_TOUCH 0x0240
     
    929931    bool icon;
    930932    QString cname;
    931     if (flags & Qt::MSWindowsOwnDC) {
     933    if (qt_widget_private(w)->isGLWidget) {
     934        cname = QLatin1String("QGLWidget");
     935        style = CS_DBLCLKS;
     936        icon  = true;
     937    } else if (flags & Qt::MSWindowsOwnDC) {
    932938        cname = QLatin1String("QWidgetOwnDC");
    933939        style = CS_DBLCLKS;
     
    10221028    wc.hCursor      = 0;
    10231029#ifndef Q_WS_WINCE
    1024     wc.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
     1030    wc.hbrBackground = qt_widget_private(w)->isGLWidget ? 0 : (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
    10251031#else
    10261032    wc.hbrBackground = 0;
     
    19021908
    19031909            if (!msg.wParam) {
     1910#ifdef Q_WS_WINCE
     1911                // On Windows CE, lParam parameter is a constant, not a char pointer.
     1912                if (msg.lParam == INI_INTL) {
     1913#else
    19041914                QString area = QString::fromWCharArray((wchar_t*)msg.lParam);
    19051915                if (area == QLatin1String("intl")) {
     1916#endif
    19061917                    QLocalePrivate::updateSystemPrivate();
    19071918                    if (!widget->testAttribute(Qt::WA_SetLocale))
     
    24372448            else
    24382449#ifndef QT_NO_MENUBAR
    2439                 QMenuBar::wceCommands(LOWORD(wParam), (HWND) lParam);
     2450                QMenuBar::wceCommands(LOWORD(wParam));
    24402451#endif
    24412452            result = true;
     
    25162527            result = false;
    25172528            break;
     2529#if !defined(Q_WS_WINCE) || defined(QT_WINCE_GESTURES)
    25182530        case WM_GESTURE: {
    25192531            GESTUREINFO gi;
     
    25482560            break;
    25492561        }
     2562#endif // !defined(Q_WS_WINCE) || defined(QT_WINCE_GESTURES)
    25502563        default:
    25512564            result = false;                        // event was not processed
     
    36173630
    36183631    setAttribute(Qt::WA_PendingUpdate, false);
    3619     const QRegion dirtyInBackingStore(qt_dirtyRegion(this));
    3620     // Make sure the invalidated region contains the region we're about to repaint.
    3621     // BeginPaint will set the clip to the invalidated region and it is impossible
    3622     // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient
    3623     // as it may return an invalid context (especially on Windows Vista).
    3624     if (!dirtyInBackingStore.isEmpty())
    3625         InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false);
     3632
     3633    if (d_func()->isGLWidget) {
     3634        if (d_func()->usesDoubleBufferedGLContext)
     3635            InvalidateRect(internalWinId(), 0, false);
     3636    } else {
     3637        const QRegion dirtyInBackingStore(qt_dirtyRegion(this));
     3638        // Make sure the invalidated region contains the region we're about to repaint.
     3639        // BeginPaint will set the clip to the invalidated region and it is impossible
     3640        // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient
     3641        // as it may return an invalid context (especially on Windows Vista).
     3642        if (!dirtyInBackingStore.isEmpty())
     3643            InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false);
     3644    }
    36263645    PAINTSTRUCT ps;
    36273646    d_func()->hd = BeginPaint(internalWinId(), &ps);
     
    39844003
    39854004
     4005bool QApplicationPrivate::HasTouchSupport = false;
    39864006PtrRegisterTouchWindow QApplicationPrivate::RegisterTouchWindow = 0;
    39874007PtrGetTouchInputInfo QApplicationPrivate::GetTouchInputInfo = 0;
     
    39904010void QApplicationPrivate::initializeMultitouch_sys()
    39914011{
     4012    static const IID QT_IID_IInkTablets = {0x112086D9, 0x7779, 0x4535, {0xA6, 0x99, 0x86, 0x2B, 0x43, 0xAC, 0x18, 0x63} };
     4013    static const IID QT_IID_IInkTablet2 = {0x90c91ad2, 0xfa36, 0x49d6, {0x95, 0x16, 0xce, 0x8d, 0x57, 0x0f, 0x6f, 0x85} };
     4014    static const CLSID QT_CLSID_InkTablets = {0x6E4FCB12, 0x510A, 0x4d40, {0x93, 0x04, 0x1D, 0xA1, 0x0A, 0xE9, 0x14, 0x7C} };
     4015
     4016    IInkTablets *iInkTablets = 0;
     4017    HRESULT hr = CoCreateInstance(QT_CLSID_InkTablets, NULL, CLSCTX_ALL, QT_IID_IInkTablets, (void**)&iInkTablets);
     4018    if (SUCCEEDED(hr)) {
     4019        long count = 0;
     4020        iInkTablets->get_Count(&count);
     4021        for (long i = 0; i < count; ++i) {
     4022            IInkTablet *iInkTablet = 0;
     4023            hr = iInkTablets->Item(i, &iInkTablet);
     4024            if (FAILED(hr))
     4025                continue;
     4026            IInkTablet2 *iInkTablet2 = 0;
     4027            hr = iInkTablet->QueryInterface(QT_IID_IInkTablet2, (void**)&iInkTablet2);
     4028            iInkTablet->Release();
     4029            if (FAILED(hr))
     4030                continue;
     4031            TabletDeviceKind kind;
     4032            hr = iInkTablet2->get_DeviceKind(&kind);
     4033            iInkTablet2->Release();
     4034            if (FAILED(hr))
     4035                continue;
     4036            if (kind == TDK_Touch) {
     4037                QApplicationPrivate::HasTouchSupport = true;
     4038                break;
     4039            }
     4040        }
     4041        iInkTablets->Release();
     4042    }
     4043
    39924044    QLibrary library(QLatin1String("user32"));
    39934045    // MinGW (g++ 3.4.5) accepts only C casts.
Note: See TracChangeset for help on using the changeset viewer.