Merge pull request #210 from pop-os/debug_jammy
Fix build with `debug` feature
This commit is contained in:
commit
a8632f56ab
3 changed files with 18 additions and 25 deletions
|
|
@ -447,7 +447,6 @@ where
|
|||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
let theme = state.theme.cosmic();
|
||||
let mut elements = cursor_elements(renderer, state, output, cursor_mode);
|
||||
|
||||
#[cfg(feature = "debug")]
|
||||
|
|
@ -472,11 +471,11 @@ where
|
|||
elements.push(fps_overlay.into());
|
||||
}
|
||||
|
||||
if state.shell.outputs.first() == Some(output) {
|
||||
if state.shell.outputs().next() == Some(output) {
|
||||
if let Some(profiler_overlay) = profiler_ui(
|
||||
state,
|
||||
renderer.glow_renderer_mut(),
|
||||
Rectangle::from_loc_and_size((0, 0), output_geo.size),
|
||||
Rectangle::from_loc_and_size((0, 0), output_geo.size).as_logical(),
|
||||
scale,
|
||||
)
|
||||
.map_err(<R as Renderer>::Error::from)
|
||||
|
|
@ -497,6 +496,8 @@ where
|
|||
return Ok(elements);
|
||||
}
|
||||
|
||||
let theme = state.theme.cosmic();
|
||||
|
||||
let overview = state.shell.overview_mode();
|
||||
let (resize_mode, resize_indicator) = state.shell.resize_mode();
|
||||
let resize_indicator = resize_indicator.map(|indicator| (resize_mode, indicator));
|
||||
|
|
|
|||
10
src/debug.rs
10
src/debug.rs
|
|
@ -327,17 +327,18 @@ fn format_pointer_focus(focus: Option<PointerFocusTarget>) -> String {
|
|||
},
|
||||
Some(Fullscreen(x)) => format!(
|
||||
"Fullscreen {} ({})",
|
||||
match x.surface() {
|
||||
match &x {
|
||||
CosmicSurface::Wayland(w) => w.toplevel().wl_surface().id().protocol_id(),
|
||||
CosmicSurface::X11(x) => x.window_id(),
|
||||
_ => unreachable!(),
|
||||
},
|
||||
x.surface().title()
|
||||
x.title()
|
||||
),
|
||||
Some(LayerSurface(x)) => format!("LayerSurface {}", x.wl_surface().id().protocol_id()),
|
||||
Some(Popup(x)) => format!("Popup {}", x.wl_surface().id().protocol_id()),
|
||||
Some(OverrideRedirect(x)) => format!("Override Redirect {}", x.window_id()),
|
||||
Some(PointerFocusTarget::ResizeFork(x)) => format!("Resize Fork {:?}", x.node),
|
||||
Some(LockSurface(x)) => format!("LockSurface {}", x.wl_surface().id().protocol_id()),
|
||||
None => format!("None"),
|
||||
}
|
||||
}
|
||||
|
|
@ -369,16 +370,17 @@ fn format_keyboard_focus(focus: Option<KeyboardFocusTarget>) -> String {
|
|||
},
|
||||
Some(Fullscreen(x)) => format!(
|
||||
"Fullscreen {} ({})",
|
||||
match x.surface() {
|
||||
match &x {
|
||||
CosmicSurface::Wayland(w) => w.toplevel().wl_surface().id().protocol_id(),
|
||||
CosmicSurface::X11(x) => x.window_id(),
|
||||
_ => unreachable!(),
|
||||
},
|
||||
x.surface().title()
|
||||
x.title()
|
||||
),
|
||||
Some(LayerSurface(x)) => format!("LayerSurface {}", x.wl_surface().id().protocol_id()),
|
||||
Some(Popup(x)) => format!("Popup {}", x.wl_surface().id().protocol_id()),
|
||||
Some(Group(_)) => format!("Window Group"),
|
||||
Some(LockSurface(x)) => format!("LockSurface {}", x.wl_surface().id().protocol_id()),
|
||||
None => format!("None"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -748,15 +748,10 @@ impl State {
|
|||
}
|
||||
#[cfg(feature = "debug")]
|
||||
if self.common.seats().position(|x| x == &seat).unwrap() == 0 {
|
||||
let location = if let Some(output) = self.common.shell.outputs.first() {
|
||||
self.common
|
||||
.shell
|
||||
.map_global_to_space(position, output)
|
||||
.to_i32_round()
|
||||
} else {
|
||||
position.to_i32_round()
|
||||
};
|
||||
self.common.egui.state.handle_pointer_motion(location);
|
||||
if let Some(output) = self.common.shell.outputs().next() {
|
||||
let location = position.to_local(&output).to_i32_round().as_logical();
|
||||
self.common.egui.state.handle_pointer_motion(location);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -808,15 +803,10 @@ impl State {
|
|||
ptr.frame(self);
|
||||
#[cfg(feature = "debug")]
|
||||
if self.common.seats().position(|x| x == &seat).unwrap() == 0 {
|
||||
let location = if let Some(output) = self.common.shell.outputs.first() {
|
||||
self.common
|
||||
.shell
|
||||
.map_global_to_space(position, output)
|
||||
.to_i32_round()
|
||||
} else {
|
||||
position.to_i32_round()
|
||||
};
|
||||
self.common.egui.state.handle_pointer_motion(location);
|
||||
if let Some(output) = self.common.shell.outputs().next() {
|
||||
let location = position.to_local(&output).to_i32_round().as_logical();
|
||||
self.common.egui.state.handle_pointer_motion(location);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue