- Timestamp:
- Aug 19, 2011, 12:33:16 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qwidget_pm.cpp
r986 r1007 1804 1804 } 1805 1805 1806 /* 1807 \internal 1808 Platform-specific part of QWidget::hide(). 1809 */ 1806 1810 void QWidgetPrivate::hide_sys() 1807 1811 { … … 1810 1814 Q_ASSERT(q->testAttribute(Qt::WA_WState_Created)); 1811 1815 if (q->windowFlags() != Qt::Desktop) { 1812 ULONG fl = SWP_HIDE; 1813 if (q->isWindow() && frameWinId() != NULLHANDLE) { 1814 if ((q->windowFlags() & Qt::Popup) != Qt::Popup) 1815 fl |= SWP_DEACTIVATE; 1816 } 1817 qt_WinSetWindowPos(frameWinId(), 0, 0, 0, 0, 0, fl); 1818 HSWITCH swEntry = maybeTopData() ? maybeTopData()->swEntry : NULLHANDLE; 1819 if (swEntry != NULLHANDLE) { 1820 SWCNTRL swc; 1821 WinQuerySwitchEntry(swEntry, &swc); 1822 swc.uchVisibility = SWL_INVISIBLE; 1823 WinChangeSwitchEntry(swEntry, &swc); 1816 HWND wid = frameWinId(); 1817 if (wid != NULLHANDLE) { 1818 ULONG fl = SWP_HIDE; 1819 if (q->isWindow()) { 1820 if ((q->windowFlags() & Qt::Popup) != Qt::Popup) 1821 fl |= SWP_DEACTIVATE; 1822 } 1823 qt_WinSetWindowPos(wid, 0, 0, 0, 0, 0, fl); 1824 HSWITCH swEntry = maybeTopData() ? maybeTopData()->swEntry : NULLHANDLE; 1825 if (swEntry != NULLHANDLE) { 1826 SWCNTRL swc; 1827 WinQuerySwitchEntry(swEntry, &swc); 1828 swc.uchVisibility = SWL_INVISIBLE; 1829 WinChangeSwitchEntry(swEntry, &swc); 1830 } 1824 1831 } 1825 1832 } … … 1833 1840 } 1834 1841 1842 /* 1843 \internal 1844 Platform-specific part of QWidget::show(). 1845 */ 1835 1846 void QWidgetPrivate::show_sys() 1836 1847 { … … 1846 1857 } 1847 1858 1848 if (frameWinId() != NULLHANDLE) { 1859 HWND wid = frameWinId(); 1860 if (wid != NULLHANDLE) { 1849 1861 ULONG fl = SWP_SHOW; 1850 1862 if (q->isWindow()) { … … 1865 1877 } 1866 1878 1867 qt_WinSetWindowPos( frameWinId(), 0, 0, 0, 0, 0, fl);1879 qt_WinSetWindowPos(wid, 0, 0, 0, 0, 0, fl); 1868 1880 1869 1881 if (q->isWindow()) { … … 1878 1890 if (!swEntry) { 1879 1891 // lazily create a new window list entry 1880 HWND id = frameWinId();1881 1892 PID pid; 1882 WinQueryWindowProcess( id, &pid, NULL);1893 WinQueryWindowProcess(wid, &pid, NULL); 1883 1894 SWCNTRL swc; 1884 1895 memset(&swc, 0, sizeof(SWCNTRL)); 1885 swc.hwnd = id;1896 swc.hwnd = wid; 1886 1897 swc.idProcess = pid; 1887 1898 swc.uchVisibility = SWL_VISIBLE; 1888 1899 swc.fbJump = SWL_JUMPABLE; 1889 WinQueryWindowText( id, sizeof(swc.szSwtitle), swc.szSwtitle);1900 WinQueryWindowText(wid, sizeof(swc.szSwtitle), swc.szSwtitle); 1890 1901 swEntry = WinAddSwitchEntry(&swc); 1891 1902 } else { … … 1897 1908 } 1898 1909 1899 ULONG wstyle = WinQueryWindowULong( frameWinId(), QWL_STYLE);1910 ULONG wstyle = WinQueryWindowULong(wid, QWL_STYLE); 1900 1911 if (wstyle & WS_MINIMIZED) 1901 1912 data.window_state |= Qt::WindowMinimized;
Note:
See TracChangeset
for help on using the changeset viewer.