summaryrefslogtreecommitdiff
path: root/src/managers/ProtocolManager.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-06-09 21:10:46 +0200
committerVaxry <vaxry@vaxry.net>2024-06-09 21:10:46 +0200
commit722b846ac5205ec3e9a2940abfefa273fa4219d4 (patch)
treea2b0d4de6104133a47a49205e6311c2b0a92006e /src/managers/ProtocolManager.cpp
parent4168b8c17b12b90873fab1ca73c2981b53f48bf5 (diff)
egl: assume implicit modifiers are available for old drivers
fixes #6367
Diffstat (limited to 'src/managers/ProtocolManager.cpp')
-rw-r--r--src/managers/ProtocolManager.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/managers/ProtocolManager.cpp b/src/managers/ProtocolManager.cpp
index bd435b27..7946a3f7 100644
--- a/src/managers/ProtocolManager.cpp
+++ b/src/managers/ProtocolManager.cpp
@@ -44,6 +44,7 @@
#include "../protocols/core/Shm.hpp"
#include "../helpers/Monitor.hpp"
+#include "../render/Renderer.hpp"
CProtocolManager::CProtocolManager() {
@@ -103,8 +104,12 @@ CProtocolManager::CProtocolManager() {
PROTO::dataWlr = std::make_unique<CDataDeviceWLRProtocol>(&zwlr_data_control_manager_v1_interface, 2, "DataDeviceWlr");
PROTO::primarySelection = std::make_unique<CPrimarySelectionProtocol>(&zwp_primary_selection_device_manager_v1_interface, 1, "PrimarySelection");
PROTO::xwaylandShell = std::make_unique<CXWaylandShellProtocol>(&xwayland_shell_v1_interface, 1, "XWaylandShell");
- PROTO::mesaDRM = std::make_unique<CMesaDRMProtocol>(&wl_drm_interface, 2, "MesaDRM");
- PROTO::linuxDma = std::make_unique<CLinuxDMABufV1Protocol>(&zwp_linux_dmabuf_v1_interface, 5, "LinuxDMABUF");
+
+ if (g_pHyprOpenGL->getDRMFormats().size() > 0) {
+ PROTO::mesaDRM = std::make_unique<CMesaDRMProtocol>(&wl_drm_interface, 2, "MesaDRM");
+ PROTO::linuxDma = std::make_unique<CLinuxDMABufV1Protocol>(&zwp_linux_dmabuf_v1_interface, 5, "LinuxDMABUF");
+ } else
+ Debug::log(WARN, "ProtocolManager: Not binding linux-dmabuf and MesaDRM: DMABUF not available");
// Old protocol implementations.
// TODO: rewrite them to use hyprwayland-scanner.