From 722b846ac5205ec3e9a2940abfefa273fa4219d4 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 9 Jun 2024 21:10:46 +0200 Subject: egl: assume implicit modifiers are available for old drivers fixes #6367 --- src/managers/ProtocolManager.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/managers/ProtocolManager.cpp') 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(&zwlr_data_control_manager_v1_interface, 2, "DataDeviceWlr"); PROTO::primarySelection = std::make_unique(&zwp_primary_selection_device_manager_v1_interface, 1, "PrimarySelection"); PROTO::xwaylandShell = std::make_unique(&xwayland_shell_v1_interface, 1, "XWaylandShell"); - PROTO::mesaDRM = std::make_unique(&wl_drm_interface, 2, "MesaDRM"); - PROTO::linuxDma = std::make_unique(&zwp_linux_dmabuf_v1_interface, 5, "LinuxDMABUF"); + + if (g_pHyprOpenGL->getDRMFormats().size() > 0) { + PROTO::mesaDRM = std::make_unique(&wl_drm_interface, 2, "MesaDRM"); + PROTO::linuxDma = std::make_unique(&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. -- cgit v1.2.3