void-packages/srcpkgs/nextcloud-client/patches/fallback-primary-screen.patch
noarchwastaken 95a1c8d872 nextcloud-client: update to 3.2.1.
Also added a patch to close #30713.

The patch `fallback-primary-screen.patch` comes from upstream master,
and should be removed in the next release.

upstream commit aadee15008
2021-05-27 02:57:18 -03:00

15 lines
872 B
Diff

upstream: https://github.com/nextcloud/desktop/commit/aadee15008ca4974e542f3fb6ca1694592d9e6fe
--- src/gui/wizard/owncloudwizard.cpp
+++ src/gui/wizard/owncloudwizard.cpp
@@ -116,7 +116,10 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
void OwncloudWizard::centerWindow()
{
const auto wizardWindow = window();
- const auto screenGeometry = QGuiApplication::screenAt(wizardWindow->pos())->geometry();
+ const auto screen = QGuiApplication::screenAt(wizardWindow->pos())
+ ? QGuiApplication::screenAt(wizardWindow->pos())
+ : QGuiApplication::primaryScreen();
+ const auto screenGeometry = screen->geometry();
const auto windowGeometry = wizardWindow->geometry();
const auto newWindowPosition = screenGeometry.center() - QPoint(windowGeometry.width() / 2, windowGeometry.height() / 2);
wizardWindow->move(newWindowPosition);