Ignore:
Timestamp:
Aug 27, 2009, 2:02:17 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Implemented QDesktopWidget.

File:
1 edited

Legend:

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

    r133 r134  
    519519
    520520        switch(msg) {
     521
     522        case WM_SYSVALUECHANGED: {
     523            // This message is sent to all top-level widgets, handle only once
     524            QWidgetList list = QApplication::topLevelWidgets();
     525            bool firstWidget = list.first()->winId() == hwnd;
     526            if (!firstWidget)
     527                break;
     528            LONG from = (LONG) mp1;
     529            LONG to = (LONG) mp2;
     530            #define MY_IS_SV(sv) (from >= (sv) && to <= (sv))
     531            if (MY_IS_SV(SV_WORKAREA_XLEFT) || MY_IS_SV(SV_WORKAREA_XRIGHT) ||
     532                MY_IS_SV(SV_WORKAREA_YBOTTOM) || MY_IS_SV(SV_WORKAREA_YTOP)) {
     533                 // send a special invalid resize event to QDesktopWidget
     534                 QApplication::sendEvent(qt_desktopWidget, 0);
     535                 // @todo enumerate all top-level widgets and
     536                 // remaximize those that are maximized
     537            } else {
     538                 /// @todo call qt_set_pm_resources() in the way it is
     539                 //  done in WM_SYSCOLORCHANGE for relevant SV_ values.
     540            }
     541            #undef MY_IS_SV
     542            break;
     543        }
    521544
    522545        case WM_BUTTON1DOWN:
Note: See TracChangeset for help on using the changeset viewer.