| | 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 |