summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp10
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp
index 2040d6bc0e..5f85e4b0b0 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp
@@ -140,11 +140,11 @@ void QEglFSKmsGbmDevice::destroyGlobalCursor()
void QEglFSKmsGbmDevice::handleDrmEvent()
{
- drmEventContext drmEvent = {
- DRM_EVENT_CONTEXT_VERSION,
- Q_NULLPTR, // vblank handler
- pageFlipHandler // page flip handler
- };
+ drmEventContext drmEvent;
+ memset(&drmEvent, 0, sizeof(drmEvent));
+ drmEvent.version = DRM_EVENT_CONTEXT_VERSION;
+ drmEvent.vblank_handler = nullptr;
+ drmEvent.page_flip_handler = pageFlipHandler;
drmHandleEvent(fd(), &drmEvent);
}
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp
index 2ca251c4af..c9fbb8281c 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp
@@ -312,11 +312,11 @@ void QLinuxFbDevice::swapBuffers(Output *output)
const int fbIdx = output->backFb;
while (output->backFb == fbIdx) {
- drmEventContext drmEvent = {
- DRM_EVENT_CONTEXT_VERSION,
- nullptr,
- pageFlipHandler
- };
+ drmEventContext drmEvent;
+ memset(&drmEvent, 0, sizeof(drmEvent));
+ drmEvent.version = DRM_EVENT_CONTEXT_VERSION;
+ drmEvent.vblank_handler = nullptr;
+ drmEvent.page_flip_handler = pageFlipHandler;
// Blocks until there is something to read on the drm fd
// and calls back pageFlipHandler once the flip completes.
drmHandleEvent(fd(), &drmEvent);