diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index 2702fe0d8..29b0e5124 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #ifdef CHATTERINO @@ -601,10 +602,10 @@ void BaseWindow::moveIntoDesktopRect(QWidget *parent, QPoint point) return; // move the widget into the screen geometry if it's not already in there - QDesktopWidget *desktop = QApplication::desktop(); + auto *desktop = QApplication::screens().first(); QPoint globalCursorPos = QCursor::pos(); - QRect s = desktop->availableGeometry(parent); + QRect s = desktop->availableGeometry(/*parent*/); bool stickRight = false; bool stickBottom = false; diff --git a/src/widgets/dialogs/NotificationPopup.cpp b/src/widgets/dialogs/NotificationPopup.cpp index 11e1b63a9..1315cdae0 100644 --- a/src/widgets/dialogs/NotificationPopup.cpp +++ b/src/widgets/dialogs/NotificationPopup.cpp @@ -5,9 +5,7 @@ #include "widgets/helper/ChannelView.hpp" #include -#include #include - #include namespace chatterino { @@ -32,7 +30,7 @@ void NotificationPopup::updatePosition() { Location location = BottomRight; - QDesktopWidget *desktop = QApplication::desktop(); + auto *desktop = QApplication::screens().first(); const QRect rect = desktop->availableGeometry(); switch (location) diff --git a/src/widgets/helper/Button.cpp b/src/widgets/helper/Button.cpp index 6fc8d7330..11a4cab38 100644 --- a/src/widgets/helper/Button.cpp +++ b/src/widgets/helper/Button.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include "BaseTheme.hpp" @@ -345,7 +344,8 @@ void Button::showMenu() return; auto point = [this] { - auto bounds = QApplication::desktop()->availableGeometry(this); + auto bounds = + QApplication::screens().first()->availableGeometry(/*this*/); auto point = this->mapToGlobal( QPoint(this->width() - this->menu_->width(), this->height())); diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index d49c9451f..fe564314c 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -22,7 +22,6 @@ #include "widgets/splits/Split.hpp" #include "widgets/splits/SplitContainer.hpp" -#include #include #include #include