Do bounds-checking on more windows (#4797)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2023-12-02 12:56:03 +01:00
committed by GitHub
parent e327ed4166
commit c4c94473ae
17 changed files with 120 additions and 38 deletions
+11
View File
@@ -508,6 +508,11 @@ void BaseWindow::moveTo(QPoint point, widgets::BoundsChecking mode)
widgets::moveWindowTo(this, point, mode);
}
void BaseWindow::showAndMoveTo(QPoint point, widgets::BoundsChecking mode)
{
widgets::showAndMoveWindowTo(this, point, mode);
}
void BaseWindow::resizeEvent(QResizeEvent *)
{
// Queue up save because: Window resized
@@ -559,6 +564,12 @@ void BaseWindow::closeEvent(QCloseEvent *)
void BaseWindow::showEvent(QShowEvent *)
{
#ifdef Q_OS_WIN
if (this->flags_.has(BoundsCheckOnShow))
{
this->moveTo(this->pos(), widgets::BoundsChecking::CursorPosition);
}
#endif
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)