don't allow negative window positions on non-virtual desktops

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17621 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2007-03-28 21:12:50 +00:00
parent 6db20c6d9d
commit 6f3538a056

View File

@ -365,6 +365,11 @@ void GuiView::setGeometry(unsigned int width,
QRect desk = dw.availableGeometry(dw.primaryScreen());
(posx >= desk.width() ? posx = 50 : true);
(posy >= desk.height()? posy = 50 : true);
// don't allow negative coordinates on a non-virtual desktop
if (!dw.isVirtualDesktop()) {
(posx < 0 ? posx = 50 : true);
(posy < 0 ? posy = 50 : true);
}
#ifdef Q_WS_WIN
// FIXME: use setGeometry only when Trolltech has fixed the qt4/X11 bug
QWidget::setGeometry(posx, posy, width, height);