fix: disable resizing and moving in maximized or fullscreen window

This commit is contained in:
2023-06-24 16:43:31 +08:00
parent 6fc9534184
commit 1e3d68df1c
2 changed files with 19 additions and 17 deletions

View File

@ -328,7 +328,7 @@ void MainWindow::mousePressEvent(QMouseEvent *event)
void MainWindow::mouseMoveEvent(QMouseEvent *event)
{
if (event->buttons() & Qt::LeftButton && m_clickedOnWindow && !isMaximized()) {
if (event->buttons() & Qt::LeftButton && m_clickedOnWindow && !isMaximized() && !isFullScreen()) {
if (!window()->windowHandle()->startSystemMove()) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
move(event->globalPosition().toPoint() - m_oldMousePos);