From 083b7b22908688f0bdb8f03ae5f4ba79430f955b Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Sun, 8 May 2022 12:51:22 +0200 Subject: [PATCH] wayland: don't advertise wl-drm, linux-dmabuf until gfx initialization --- src/globals.rs | 4 ---- src/state.rs | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/globals.rs b/src/globals.rs index cd3a20ed..8109096b 100644 --- a/src/globals.rs +++ b/src/globals.rs @@ -10,7 +10,6 @@ use { jay_compositor::JayCompositorGlobal, org_kde_kwin_server_decoration_manager::OrgKdeKwinServerDecorationManagerGlobal, wl_compositor::WlCompositorGlobal, - wl_drm::WlDrmGlobal, wl_output::WlOutputGlobal, wl_registry::WlRegistry, wl_seat::{ @@ -23,7 +22,6 @@ use { zwlr_layer_shell_v1::ZwlrLayerShellV1Global, zwlr_screencopy_manager_v1::ZwlrScreencopyManagerV1Global, zwp_idle_inhibit_manager_v1::ZwpIdleInhibitManagerV1Global, - zwp_linux_dmabuf_v1::ZwpLinuxDmabufV1Global, zxdg_decoration_manager_v1::ZxdgDecorationManagerV1Global, zxdg_output_manager_v1::ZxdgOutputManagerV1Global, }, @@ -133,8 +131,6 @@ impl Globals { add_singleton!(WlSubcompositorGlobal); add_singleton!(XdgWmBaseGlobal); add_singleton!(WlDataDeviceManagerGlobal); - add_singleton!(ZwpLinuxDmabufV1Global); - add_singleton!(WlDrmGlobal); add_singleton!(ZxdgDecorationManagerV1Global); add_singleton!(OrgKdeKwinServerDecorationManagerGlobal); add_singleton!(ZwpPrimarySelectionDeviceManagerV1Global); diff --git a/src/state.rs b/src/state.rs index c68ef766..ca3b3945 100644 --- a/src/state.rs +++ b/src/state.rs @@ -16,11 +16,13 @@ use { forker::ForkerProxy, globals::{Globals, GlobalsError, WaylandGlobal}, ifs::{ + wl_drm::WlDrmGlobal, wl_seat::{SeatIds, WlSeatGlobal}, wl_surface::{ zwp_idle_inhibitor_v1::{IdleInhibitorId, IdleInhibitorIds, ZwpIdleInhibitorV1}, NoneSurfaceExt, WlSurface, }, + zwp_linux_dmabuf_v1::ZwpLinuxDmabufV1Global, }, leaks::Tracker, logger::Logger, @@ -254,6 +256,8 @@ impl State { } if ctx.is_some() && !self.render_ctx_ever_initialized.replace(true) { + self.add_global(&Rc::new(WlDrmGlobal::new(self.globals.name()))); + self.add_global(&Rc::new(ZwpLinuxDmabufV1Global::new(self.globals.name()))); if let Some(config) = self.config.get() { config.graphics_initialized(); }