1
0
Fork 0
forked from wry/wry

wayland: don't advertise wl-drm, linux-dmabuf until gfx initialization

This commit is contained in:
Julian Orth 2022-05-08 12:51:22 +02:00
parent 1e9cc60693
commit 083b7b2290
2 changed files with 4 additions and 4 deletions

View file

@ -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);

View file

@ -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();
}