diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-17 17:04:23 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-17 17:08:14 +0300 |
| commit | 6b16cc52dbfaa12889cadb93ce19da3e3fde46f2 (patch) | |
| tree | 27225675f38ad642676691e4f6fa69f5ed628239 /src/niri.rs | |
| parent | d35ad73e3572b0ac704b0c08928f53d0cfd1951f (diff) | |
| download | niri-6b16cc52dbfaa12889cadb93ce19da3e3fde46f2.tar.gz niri-6b16cc52dbfaa12889cadb93ce19da3e3fde46f2.tar.bz2 niri-6b16cc52dbfaa12889cadb93ce19da3e3fde46f2.zip | |
Add force-pipewire-invalid-modifier debug flag
Diffstat (limited to 'src/niri.rs')
| -rw-r--r-- | src/niri.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/niri.rs b/src/niri.rs index b2e17d5d..336446b3 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -1486,6 +1486,8 @@ impl State { #[cfg(feature = "xdp-gnome-screencast")] pub fn on_screen_cast_msg(&mut self, msg: ScreenCastToNiri) { + use smithay::reexports::gbm::Modifier; + use crate::dbus::mutter_screen_cast::StreamTargetId; match msg { @@ -1560,13 +1562,23 @@ impl State { } }; - let render_formats = self + let mut render_formats = self .backend .with_primary_renderer(|renderer| { renderer.egl_context().dmabuf_render_formats().clone() }) .unwrap_or_default(); + { + let config = self.niri.config.borrow(); + if config.debug.force_pipewire_invalid_modifier { + render_formats = render_formats + .into_iter() + .filter(|f| f.modifier == Modifier::Invalid) + .collect(); + } + } + let res = pw.start_cast( gbm, render_formats, |
