Fix packaged build

This commit is contained in:
Ilya Fedin 2022-08-05 14:45:42 +04:00 committed by John Preston
parent bda46510f5
commit 4689c896e2

View file

@ -12,6 +12,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "waylandshells/xdg_shell.h"
#include "qwayland-xdg-shell.h"
// must be before QtPlugin include
#ifndef QT_STATICPLUGIN
#define QT_STATICPLUGIN
#endif // !QT_STATICPLUGIN
#include <QtCore/QtPlugin>
#include <QtGui/QGuiApplication>
#include <QtGui/QWindow>
@ -24,10 +29,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#define slots Q_SLOTS
#endif // QT_NO_KEYWORDS
#ifndef QT_STATICPLUGIN
#define QT_STATICPLUGIN
#endif // !QT_STATICPLUGIN
#include <private/qwaylanddisplay_p.h>
#include <private/qwaylandwindow_p.h>
#include <private/qwaylandinputdevice_p.h>
@ -70,8 +71,9 @@ public:
QRect geometry() const override {
if (!_settingGeometry) {
if (const auto widgetWindow = qobject_cast<const QWidgetWindow*>(
window())) {
if (window()->inherits("QWidgetWindow")) {
const auto widgetWindow = static_cast<QWidgetWindow*>(
window());
return widgetWindow->widget()->geometry();
}
}