summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2017-04-10 04:52:44 (GMT)
committerMartin Gräßlin <mgraesslin@kde.org>2017-04-10 19:18:41 (GMT)
commitc8cd474acd0c364ef37637174afe98578033fa4c (patch)
tree0b4b5e67e791256f7db55f1b8102c68a88fcc8c3
parentb62c8fb4014e0a1ba3d1ea83003aed91ffef077d (diff)
[platforms/drm] Explicitly request event context version 2refs/backups/branch-Plasma/5.8-1492017190
Summary: Libdrm 2.4.78 introduces a version 2 and if KWin gets built against it our code would break. Given that this change is for Plasma/5.8 branch. Closes T5839 Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Maniphest Tasks: T5839 Differential Revision: https://phabricator.kde.org/D5380
-rw-r--r--plugins/platforms/drm/drm_backend.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/platforms/drm/drm_backend.cpp b/plugins/platforms/drm/drm_backend.cpp
index bb6b821..3b6ee35 100644
--- a/plugins/platforms/drm/drm_backend.cpp
+++ b/plugins/platforms/drm/drm_backend.cpp
@@ -61,6 +61,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DRM_CAP_CURSOR_HEIGHT 0x9
#endif
+#define KWIN_DRM_EVENT_CONTEXT_VERSION 2
+
namespace KWin
{
@@ -240,7 +242,7 @@ void DrmBackend::openDrm()
}
drmEventContext e;
memset(&e, 0, sizeof e);
- e.version = DRM_EVENT_CONTEXT_VERSION;
+ e.version = KWIN_DRM_EVENT_CONTEXT_VERSION;
e.page_flip_handler = pageFlipHandler;
drmHandleEvent(m_fd, &e);
}