Skip to content

Commit

Permalink
wayland: disable use of wlr-output-management protocol
Browse files Browse the repository at this point in the history
refs: #2297
refs: #2293
refs: #2360
  • Loading branch information
wez committed Aug 7, 2022
1 parent e443593 commit e2bf468
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions window/src/os/wayland/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Inner {
_ddata: DispatchData,
_inner: &Arc<Mutex<Self>>,
) {
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,
Expand Down Expand Up @@ -98,7 +98,7 @@ impl Inner {
_ddata: DispatchData,
inner: &Arc<Mutex<Self>>,
) {
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,
Expand Down Expand Up @@ -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);
}
Expand All @@ -170,7 +171,7 @@ impl Inner {
_ddata: DispatchData,
inner: &Arc<Mutex<Self>>,
) {
log::debug!("{event:?}");
log::debug!("handle_zwlr_output_event {event:?}");
match event {
ZwlrOutputEvent::Head { head } => {
let inner = Arc::clone(inner);
Expand Down Expand Up @@ -271,6 +272,9 @@ impl GlobalHandler<ZwlrOutputManagerV1> for OutputHandler {
version: u32,
_ddata: DispatchData,
) {
if !config::configuration().enable_zwlr_output_manager {
return;
}
log::debug!("created ZwlrOutputManagerV1 {id} {version}");
let zwlr = registry.bind::<ZwlrOutputManagerV1>(2, id);

Expand Down

0 comments on commit e2bf468

Please sign in to comment.