Ignore:
Timestamp:
Sep 16, 2009, 10:34:10 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Fixed: Close popups when resizing/moving the top level window.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/qapplication_pm.cpp

    r182 r185  
    742742                            int maxiter = 1024;
    743743                            QWidget *popup;
    744                             while ( (popup=QApplication::activePopupWidget()) && maxiter-- )
     744                            while ((popup=QApplication::activePopupWidget()) && maxiter--)
    745745                                popup->close();
    746746                        }
     
    947947            if (widget->translateConfigEvent(qmsg))
    948948                return (MRESULT)TRUE;
     949            break;
     950        }
     951
     952        case WM_TRACKFRAME: {
     953            if (QApplication::activePopupWidget()) {
     954                // Another application was activated while our popups are open,
     955                // then close all popups.  In case some popup refuses to close,
     956                // we give up after 1024 attempts (to avoid an infinite loop).
     957                int maxiter = 1024;
     958                QWidget *popup;
     959                while ((popup=QApplication::activePopupWidget()) && maxiter--)
     960                    popup->close();
     961            }
    949962            break;
    950963        }
     
    21272140
    21282141    default:
     2142#if 0
     2143        if (qmsg.msg == WM_QUERYICON)
     2144            break;
     2145        str = QString().sprintf("WM_%04lX: hwnd %08lX.", qmsg.msg, qmsg.hwnd);
     2146        str += qWidgetName(qWidgetFromHWND(qmsg.hwnd));
     2147#endif
    21292148        break;
    21302149    }
Note: See TracChangeset for help on using the changeset viewer.