Fix moving floating windows to negative positions
QScreen::geometry() is already in "virtual coordinate space", no need to map again. Bug wasn't noticeable since most setups have virtual top left at 0,0, so it was a no-op in most cases. Fixes bug #321
This commit is contained in:
@@ -760,10 +760,7 @@ void FloatingWindow::ensureRectIsOnScreen(QRect &geometry)
|
||||
|
||||
const int screenCount = screens.count();
|
||||
for (int i = 0; i < screenCount; i++) {
|
||||
auto scrGeom = screens[i]->geometry();
|
||||
|
||||
// Account for virtual coordinates space
|
||||
scrGeom.moveTopLeft(scrGeom.topLeft() - screens[i]->virtualGeometry().topLeft());
|
||||
const QRect scrGeom = screens[i]->geometry();
|
||||
|
||||
// If the rectangle is visible at all, we need do nothing
|
||||
if (scrGeom.intersects(geometry))
|
||||
|
||||
Reference in New Issue
Block a user