parent
3216defd59
commit
efb56c712c
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "framelesshelper_win32.h"
|
#include "framelesshelper_win32.h"
|
||||||
|
#include <QtCore/qdebug.h>
|
||||||
#include <QtCore/qmutex.h>
|
#include <QtCore/qmutex.h>
|
||||||
#include <QtCore/qvariant.h>
|
#include <QtCore/qvariant.h>
|
||||||
#include <QtCore/qcoreapplication.h>
|
#include <QtCore/qcoreapplication.h>
|
||||||
|
|
|
@ -169,7 +169,11 @@ void FramelessQuickUtils::showSystemMenu(QWindow *window, const QPointF &pos)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef Q_OS_WINDOWS
|
#ifdef Q_OS_WINDOWS
|
||||||
|
# if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||||
const QPointF globalPos = window->mapToGlobal(pos) * window->devicePixelRatio();
|
const QPointF globalPos = window->mapToGlobal(pos) * window->devicePixelRatio();
|
||||||
|
# else
|
||||||
|
const QPointF globalPos = QPointF(window->mapToGlobal(pos.toPoint())) * window->devicePixelRatio();
|
||||||
|
# endif
|
||||||
Utilities::showSystemMenu(window->winId(), globalPos);
|
Utilities::showSystemMenu(window->winId(), globalPos);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include "framelesshelper_global.h"
|
#include "framelesshelper_global.h"
|
||||||
#include <QtCore/qobject.h>
|
#include <QtCore/qobject.h>
|
||||||
#include <QtGui/qwindow.h>
|
#include <QtGui/qwindow.h>
|
||||||
#include <QtQml/qqmlregistration.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QWindow;
|
class QWindow;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
#include <QtCore/qdebug.h>
|
||||||
#include <QtCore/private/qsystemlibrary_p.h>
|
#include <QtCore/private/qsystemlibrary_p.h>
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
|
||||||
# include <QtCore/qoperatingsystemversion.h>
|
# include <QtCore/qoperatingsystemversion.h>
|
||||||
|
|
Loading…
Reference in New Issue