Changeset 48 for psi/trunk/src
- Timestamp:
- Sep 11, 2006, 12:08:07 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
psi/trunk/src/common.cpp
r44 r48 1744 1744 void bringToFront(QWidget *w, bool grabFocus /* = true */) 1745 1745 { 1746 #if def Q_WS_X111746 #if defined(Q_WS_X11) 1747 1747 // If we're not on the current desktop, do the hide/show trick 1748 1748 long dsk, curr_dsk; … … 1754 1754 } 1755 1755 } 1756 1756 #else 1757 1757 // FIXME: multi-desktop hacks for Win and Mac required 1758 1758 #endif … … 1777 1777 w->raise(); 1778 1778 #endif 1779 1780 #if defined(Q_WS_PM) 1781 // When the widget is totally outside the screen bounds after making it shown, 1782 // we assume it's on a different (invisible) XPager's page. The assumption is 1783 // not so safe, but is there any other way to determine XPager is in action?.. 1784 QRect geo = w->frameGeometry(); 1785 QRect scrGeo = qApp->desktop()->screenGeometry(); 1786 if (!w->isMinimized() && !scrGeo.contains(geo)) { 1787 // We assume that XPager stores invisible pages in the coordinate space 1788 // beyond (0,0)x(screen_width,screen_height) wiht a 8 px gap between 1789 // pages. Move it to the visible page. 1790 int sw = scrGeo.width() + 8; 1791 int sh = scrGeo.height() + 8; 1792 int x = geo.x() % sw; 1793 if (x < 0) x = sw + x; 1794 int y = geo.y() % sh; 1795 if (y < 0) y = sh + y; 1796 w->move (x, y); 1797 } 1798 #endif 1779 1799 } 1780 1800
Note:
See TracChangeset
for help on using the changeset viewer.