Only use QPlatformNativeInterface on X11
This commit is contained in:
parent
43876e967a
commit
531e97b499
|
@ -222,16 +222,16 @@ if(X11_FOUND)
|
||||||
else()
|
else()
|
||||||
message(WARNING, "Missing X11/XF86keysym.h")
|
message(WARNING, "Missing X11/XF86keysym.h")
|
||||||
endif()
|
endif()
|
||||||
endif(X11_FOUND)
|
|
||||||
|
|
||||||
find_path(QPA_QPLATFORMNATIVEINTERFACE_H qpa/qplatformnativeinterface.h PATHS ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
|
find_path(QPA_QPLATFORMNATIVEINTERFACE_H qpa/qplatformnativeinterface.h PATHS ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
|
||||||
if(QPA_QPLATFORMNATIVEINTERFACE_H)
|
if(QPA_QPLATFORMNATIVEINTERFACE_H)
|
||||||
set(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H ON)
|
set(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H ON)
|
||||||
include_directories(${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
|
include_directories(${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
|
||||||
message(STATUS "Have qpa/qplatformnativeinterface.h header.")
|
message(STATUS "Have qpa/qplatformnativeinterface.h header.")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Missing qpa/qplatformnativeinterface.h header.")
|
message(STATUS "Missing qpa/qplatformnativeinterface.h header.")
|
||||||
endif()
|
endif()
|
||||||
|
endif(X11_FOUND)
|
||||||
|
|
||||||
# TAGLIB
|
# TAGLIB
|
||||||
pkg_check_modules(TAGLIB REQUIRED taglib>=1.11.1)
|
pkg_check_modules(TAGLIB REQUIRED taglib>=1.11.1)
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
#include <QtEvents>
|
#include <QtEvents>
|
||||||
#ifdef HAVE_X11EXTRAS
|
#ifdef HAVE_X11EXTRAS
|
||||||
# include <QX11Info>
|
# include <QX11Info>
|
||||||
#elif defined(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
|
#elif defined(Q_OS_UNIX) && defined(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
|
||||||
# include <qpa/qplatformnativeinterface.h>
|
# include <qpa/qplatformnativeinterface.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINEXTRAS
|
#ifdef HAVE_WINEXTRAS
|
||||||
|
@ -219,7 +219,7 @@ bool OSDPretty::IsTransparencyAvailable() {
|
||||||
|
|
||||||
#if defined(HAVE_X11EXTRAS)
|
#if defined(HAVE_X11EXTRAS)
|
||||||
return QX11Info::isCompositingManagerRunning();
|
return QX11Info::isCompositingManagerRunning();
|
||||||
#elif defined(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
|
#elif defined(Q_OS_UNIX) && defined(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
|
||||||
if (qApp) {
|
if (qApp) {
|
||||||
QPlatformNativeInterface *native = qApp->platformNativeInterface();
|
QPlatformNativeInterface *native = qApp->platformNativeInterface();
|
||||||
if (native) {
|
if (native) {
|
||||||
|
|
Loading…
Reference in New Issue