From 6f3538a056d2b718e1201d8794ce5b6f0dd808cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Wed, 28 Mar 2007 21:12:50 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiView.C | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontends/qt4/GuiView.C b/src/frontends/qt4/GuiView.C index b2d7732f2e..8c0ff308af 100644 --- a/src/frontends/qt4/GuiView.C +++ b/src/frontends/qt4/GuiView.C @@ -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); -- 2.39.5