Ignore:
Timestamp:
Mar 8, 2010, 12:52:58 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.2 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

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

    r569 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 20 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    14461446#endif
    14471447
    1448     if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
     1448    if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) {
     1449        // Okay, we are about to destroy the top-level window that owns
     1450        // the backing store. Make sure we delete the backing store right away
     1451        // before the window handle is invalid. This is important because
     1452        // the backing store will delete its window surface, which may or may
     1453        // not have a reference to this widget that will be used later to
     1454        // notify the window it no longer has a surface.
     1455        delete d->extra->topextra->backingStore;
     1456        d->extra->topextra->backingStore = 0;
     1457    } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
    14491458        bs->removeDirtyWidget(this);
    14501459        if (testAttribute(Qt::WA_StaticContents))
     
    20332042#endif
    20342043
     2044
     2045
     2046
     2047
     2048
     2049
     2050
     2051
    20352052    if (q->testAttribute(Qt::WA_OpaquePaintEvent) || q->testAttribute(Qt::WA_PaintOnScreen)) {
    20362053        setOpaque(true);
     
    30953112        QInputContext *qic = focusWidget->d_func()->inputContext();
    30963113        if (enable) {
    3097             qic->setFocusWidget(focusWidget);
     3114            if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled))
     3115                qic->setFocusWidget(focusWidget);
    30983116        } else {
    30993117            qic->reset();
     
    64126430    }
    64136431
     6432
     6433
    64146434
    64156435    if (QWidget *sp = second->focusProxy())
     
    1039910419        QWidget *focusWidget = d->effectiveFocusWidget();
    1040010420        QInputContext *ic = 0;
    10401         if (on && !internalWinId() && testAttribute(Qt::WA_InputMethodEnabled) && hasFocus()) {
     10421        if (on && !internalWinId() && hasFocus()
     10422            && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) {
    1040210423            ic = focusWidget->d_func()->inputContext();
    10403             ic->reset();
    10404             ic->setFocusWidget(0);
     10424            if (ic) {
     10425                ic->reset();
     10426                ic->setFocusWidget(0);
     10427            }
    1040510428        }
    10406 #endif
    1040710429        if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget())
    1040810430            parentWidget()->d_func()->enforceNativeChildren();
    1040910431        if (on && !internalWinId() && testAttribute(Qt::WA_WState_Created))
    1041010432            d->createWinId();
    10411 #ifndef QT_NO_IM
    10412         if (ic && isEnabled())
     10433        if (ic && isEnabled() && focusWidget->isEnabled()
     10434       
    1041310435            ic->setFocusWidget(focusWidget);
     10436
    1041410437#endif //QT_NO_IM
    1041510438        break;
     
    1044910472        if (ic) {
    1045010473            if (on && hasFocus() && ic->focusWidget() != focusWidget && isEnabled()) {
     10474
    1045110475                ic->setFocusWidget(focusWidget);
    1045210476            } else if (!on && ic->focusWidget() == focusWidget) {
Note: See TracChangeset for help on using the changeset viewer.