From f2e594358c6be6413050d8c7418ea3c8a429c60c Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 16 Aug 2022 13:39:18 +0300 Subject: [PATCH] Remove Platform::supportsOutputChanges() If the platform does not support configuring outputs, applying a config must fail. However, almost all output backends support output configuring except, perhaps, the x11 backend, but that case doesn't matter. --- src/backends/drm/drm_backend.cpp | 1 - src/backends/virtual/virtual_backend.cpp | 1 - src/backends/wayland/wayland_backend.cpp | 1 - src/platform.h | 9 --------- 4 files changed, 12 deletions(-) diff --git a/src/backends/drm/drm_backend.cpp b/src/backends/drm/drm_backend.cpp index 4118339bdf..09abc80457 100644 --- a/src/backends/drm/drm_backend.cpp +++ b/src/backends/drm/drm_backend.cpp @@ -85,7 +85,6 @@ DrmBackend::DrmBackend(Session *session, QObject *parent) { setSupportsPointerWarping(true); setSupportsGammaControl(true); - supportsOutputChanges(); } DrmBackend::~DrmBackend() = default; diff --git a/src/backends/virtual/virtual_backend.cpp b/src/backends/virtual/virtual_backend.cpp index 1f1b726356..955a923a52 100644 --- a/src/backends/virtual/virtual_backend.cpp +++ b/src/backends/virtual/virtual_backend.cpp @@ -31,7 +31,6 @@ VirtualBackend::VirtualBackend(QObject *parent) } } - supportsOutputChanges(); setSupportsPointerWarping(true); setSupportsGammaControl(true); } diff --git a/src/backends/wayland/wayland_backend.cpp b/src/backends/wayland/wayland_backend.cpp index 304d9c316b..ba14ea3d45 100644 --- a/src/backends/wayland/wayland_backend.cpp +++ b/src/backends/wayland/wayland_backend.cpp @@ -576,7 +576,6 @@ WaylandBackend::WaylandBackend(QObject *parent) , m_connectionThreadObject(new ConnectionThread(nullptr)) , m_connectionThread(nullptr) { - supportsOutputChanges(); connect(this, &WaylandBackend::connectionFailed, qApp, &QCoreApplication::quit); #if HAVE_WAYLAND_EGL diff --git a/src/platform.h b/src/platform.h index 6adead379d..7d1d1a1185 100644 --- a/src/platform.h +++ b/src/platform.h @@ -391,14 +391,6 @@ protected: m_supportsGammaControl = set; } - /** - * Whether the backend is supposed to change the configuration of outputs. - */ - void supportsOutputChanges() - { - m_supportsOutputChanges = true; - } - private: bool m_ready = false; QSize m_initialWindowSize; @@ -409,7 +401,6 @@ private: EGLDisplay m_eglDisplay; EGLContext m_globalShareContext = EGL_NO_CONTEXT; bool m_supportsGammaControl = false; - bool m_supportsOutputChanges = false; CompositingType m_selectedCompositor = NoCompositing; Output *m_primaryOutput = nullptr; };