Commit 6befb657 authored by Felipe Kinoshita's avatar Felipe Kinoshita 🌎 Committed by Nate Graham
Browse files

[klipper] fix warning

parent 0a83cc73
......@@ -24,6 +24,7 @@
#include <QApplication>
#include <QDesktopWidget>
#include <QKeyEvent>
#include <QScreen>
#include <QWidgetAction>
#include <KHelpMenu>
......@@ -83,9 +84,12 @@ KlipperPopup::KlipperPopup(History *history)
ensurePolished();
KWindowInfo windowInfo(winId(), NET::WMGeometry);
QRect geometry = windowInfo.geometry();
QRect screen = qApp->desktop()->screenGeometry(geometry.center());
int menuHeight = (screen.height()) * 3 / 4;
int menuWidth = (screen.width()) * 1 / 3;
QScreen *screen = QGuiApplication::screenAt(geometry.center());
if (screen == nullptr) {
return;
}
int menuHeight = (screen->geometry().height()) * 3 / 4;
int menuWidth = (screen->geometry().width()) * 1 / 3;
m_popupProxy = new PopupProxy(this, menuHeight, menuWidth);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment