diff --git a/src/backends/drm/drm_object_connector.cpp b/src/backends/drm/drm_object_connector.cpp index 2b4faf0821..9e0d3c6abc 100644 --- a/src/backends/drm/drm_object_connector.cpp +++ b/src/backends/drm/drm_object_connector.cpp @@ -20,24 +20,14 @@ #include #include +#include namespace KWin { static bool checkIfEqual(const drmModeModeInfo *one, const drmModeModeInfo *two) { - return one->clock == two->clock - && one->hdisplay == two->hdisplay - && one->hsync_start == two->hsync_start - && one->hsync_end == two->hsync_end - && one->htotal == two->htotal - && one->hskew == two->hskew - && one->vdisplay == two->vdisplay - && one->vsync_start == two->vsync_start - && one->vsync_end == two->vsync_end - && one->vtotal == two->vtotal - && one->vscan == two->vscan - && one->vrefresh == two->vrefresh; + return std::memcmp(one, two, sizeof(drmModeModeInfo)) == 0; } static quint64 refreshRateForMode(_drmModeModeInfo *m)