From e2bf468393f77e227e518ac4acb8f1c74edc003e Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 7 Aug 2022 08:10:59 -0700 Subject: [PATCH] wayland: disable use of wlr-output-management protocol refs: #2297 refs: #2293 refs: #2360 --- config/src/config.rs | 2 ++ window/src/os/wayland/output.rs | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config/src/config.rs b/config/src/config.rs index bc6312630..51d3815f6 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -371,6 +371,8 @@ pub struct Config { /// The default is true. #[dynamic(default = "default_true")] pub enable_wayland: bool, + #[dynamic(default)] + pub enable_zwlr_output_manager: bool, /// Whether to prefer EGL over other GL implementations. /// EGL on Windows has jankier resize behavior than WGL (which diff --git a/window/src/os/wayland/output.rs b/window/src/os/wayland/output.rs index a78cf9857..8448dc9be 100644 --- a/window/src/os/wayland/output.rs +++ b/window/src/os/wayland/output.rs @@ -64,7 +64,7 @@ impl Inner { _ddata: DispatchData, _inner: &Arc>, ) { - log::debug!("{event:?}"); + log::debug!("handle_zwlr_mode_event {event:?}"); let id = wl_id(mode.detach()); let mut info = self.zwlr_mode_info.entry(id).or_insert_with(|| ModeInfo { id, @@ -98,7 +98,7 @@ impl Inner { _ddata: DispatchData, inner: &Arc>, ) { - log::debug!("{event:?}"); + log::debug!("handle_zwlr_head_event {event:?}"); let id = wl_id(head.detach()); let mut info = self.zwlr_head_info.entry(id).or_insert_with(|| HeadInfo { id, @@ -155,6 +155,7 @@ impl Inner { } ZwlrOutputHeadEvent::Finished => { drop(info); + log::debug!("remove head with id {id}"); self.zwlr_heads.remove(&id); self.zwlr_head_info.remove(&id); } @@ -170,7 +171,7 @@ impl Inner { _ddata: DispatchData, inner: &Arc>, ) { - log::debug!("{event:?}"); + log::debug!("handle_zwlr_output_event {event:?}"); match event { ZwlrOutputEvent::Head { head } => { let inner = Arc::clone(inner); @@ -271,6 +272,9 @@ impl GlobalHandler for OutputHandler { version: u32, _ddata: DispatchData, ) { + if !config::configuration().enable_zwlr_output_manager { + return; + } log::debug!("created ZwlrOutputManagerV1 {id} {version}"); let zwlr = registry.bind::(2, id);