diff --git a/src/common/QskFunctions.cpp b/src/common/QskFunctions.cpp index 77638fe0..ef54f77c 100644 --- a/src/common/QskFunctions.cpp +++ b/src/common/QskFunctions.cpp @@ -180,10 +180,18 @@ qreal qskGlobalScaleFactor() return QHighDpiScaling::factor( noScreen ); } -bool qskHasPlatformWindowManagement() +const QPlatformIntegration* qskPlatformIntegration() { - if ( auto platform = QGuiApplicationPrivate::platformIntegration() ) - return platform->hasCapability( QPlatformIntegration::WindowManagement ); + return QGuiApplicationPrivate::platformIntegration(); +} + +bool qskMaybeDesktopPlatform() +{ +#if QT_CONFIG(cursor) + // this is what QC2 is doing for menus ? + if ( const auto platform = QGuiApplicationPrivate::platformIntegration() ) + return platform->hasCapability( QPlatformIntegration::MultipleWindows ); +#endif return false; } diff --git a/src/common/QskFunctions.h b/src/common/QskFunctions.h index b8a95b1d..2d0d5dbe 100644 --- a/src/common/QskFunctions.h +++ b/src/common/QskFunctions.h @@ -15,10 +15,13 @@ class QScreen; class QFont; class QFontMetricsF; class QString; +class QPlatformIntegration; QSK_EXPORT qreal qskDpiScaled( qreal value ); QSK_EXPORT qreal qskGlobalScaleFactor(); -QSK_EXPORT bool qskHasPlatformWindowManagement(); + +QSK_EXPORT bool qskMaybeDesktopPlatform(); +QSK_EXPORT const QPlatformIntegration* qskPlatformIntegration(); QSK_EXPORT QRect qskPlatformScreenGeometry( const QScreen* ); QSK_EXPORT QRect qskAlignedRect( const QRect& outerRect,