summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp')
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp10
1 files changed, 5 insertions, 5 deletions
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);