1
0
Fork 0
forked from wry/wry

wl_drm: hide global if invalid modifier is not supported

This commit is contained in:
Julian Orth 2025-04-05 17:55:53 +02:00
parent f2139f0835
commit 8a83d844e9
3 changed files with 16 additions and 0 deletions

View file

@ -6,6 +6,7 @@ use {
ifs::wl_buffer::WlBuffer,
leaks::Tracker,
object::{Object, Version},
state::State,
video::{
INVALID_MODIFIER,
dmabuf::{DmaBuf, DmaBufPlane, PlaneVec},
@ -62,6 +63,13 @@ impl Global for WlDrmGlobal {
fn version(&self) -> u32 {
2
}
fn exposed(&self, state: &State) -> bool {
let Some(ctx) = state.render_ctx.get() else {
return false;
};
ctx.supports_invalid_modifier()
}
}
simple_add_global!(WlDrmGlobal);