mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
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:
parent
6db20c6d9d
commit
6f3538a056
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user