9#include <private/qeglfsintegration_p.h>
11#include <QtCore/QLoggingCategory>
12#include <QtCore/private/qcore_unix_p.h>
14#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
22 , m_gbm_device(
nullptr)
23 , m_globalCursor(
nullptr)
38 qCDebug(qLcEglfsKmsDebug) <<
"Creating GBM device for file descriptor" <<
fd
40 m_gbm_device = gbm_create_device(
fd);
51 qCDebug(qLcEglfsKmsDebug,
"Using dedicated drm event reading thread");
52 m_eventReader.
create(
this);
54 qCDebug(qLcEglfsKmsDebug,
"Not using dedicated drm event reading thread; "
55 "threaded multi-screen setups may experience problems");
69 gbm_device_destroy(m_gbm_device);
70 m_gbm_device =
nullptr;
91 return m_globalCursor;
99 qCDebug(qLcEglfsKmsDebug,
"Destroying global GBM mouse cursor");
100 delete m_globalCursor;
101 m_globalCursor =
nullptr;
108 qCDebug(qLcEglfsKmsDebug,
"Creating new global GBM mouse cursor");
131 if (!screenThisScreenClones && screensCloningThisScreen.
isEmpty())
135 gbmScreen->
initCloning(screenThisScreenClones, screensCloningThisScreen);
151 return !eventReaderThreadDisabled;
void registerScreen(QPlatformScreen *screen, bool isPrimary, const QPoint &virtualPos, const QList< QPlatformScreen * > &virtualSiblings) override
void create(QEglFSKmsDevice *device)
void reevaluateVisibilityForScreens()
void registerScreen(QPlatformScreen *screen, bool isPrimary, const QPoint &virtualPos, const QList< QPlatformScreen * > &virtualSiblings) override
QPlatformScreen * createScreen(const QKmsOutput &output) override
gbm_device * gbmDevice() const
QPlatformScreen * createHeadlessScreen() override
QPlatformCursor * globalCursor() const
void * nativeDisplay() const override
bool usesEventReader() const
void registerScreenCloning(QPlatformScreen *screen, QPlatformScreen *screenThisScreenClones, const QList< QPlatformScreen * > &screensCloningThisScreen) override
void createGlobalCursor(QEglFSKmsGbmScreen *screen)
void destroyGlobalCursor()
void initCloning(QPlatformScreen *screenThisScreenClones, const QList< QPlatformScreen * > &screensCloningThisScreen)
QKmsScreenConfig * screenConfig() const
QString devicePath() const
bool isEmpty() const noexcept
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
void qErrnoWarning(const char *msg,...)
Combined button and popup list for selecting options.
static int qt_safe_open(const char *pathname, int flags, mode_t mode=0777)
static int qt_safe_close(int fd)
#define qCDebug(category,...)
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLsizei const GLchar *const * path
#define qPrintable(string)
static char * toLocal8Bit(char *out, QStringView in, QStringConverter::State *state)
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
QT_BEGIN_NAMESPACE typedef uchar * output