cargo fmt
This commit is contained in:
parent
5e9ea93819
commit
b6c5d00bec
17 changed files with 264 additions and 277 deletions
|
|
@ -11,9 +11,11 @@ impl BufferHandler for State {
|
|||
fn buffer_destroyed(&mut self, buffer: &WlBuffer) {
|
||||
if let BackendData::Kms(kms_state) = &mut self.backend {
|
||||
for device in kms_state.drm_devices.values_mut() {
|
||||
if device.inner.active_buffers.remove(&buffer.downgrade()) && !device
|
||||
if device.inner.active_buffers.remove(&buffer.downgrade())
|
||||
&& !device
|
||||
.inner
|
||||
.in_use(kms_state.primary_node.read().unwrap().as_ref()) {
|
||||
.in_use(kms_state.primary_node.read().unwrap().as_ref())
|
||||
{
|
||||
if let Err(err) = kms_state.refresh_used_devices() {
|
||||
warn!(?err, "Failed to init devices.");
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ impl PointerConstraintsHandler for State {
|
|||
fn new_constraint(&mut self, surface: &WlSurface, pointer: &PointerHandle<Self>) {
|
||||
// XXX region
|
||||
if pointer
|
||||
.current_focus().is_some_and(|x| x.wl_surface().as_deref() == Some(surface))
|
||||
.current_focus()
|
||||
.is_some_and(|x| x.wl_surface().as_deref() == Some(surface))
|
||||
{
|
||||
with_pointer_constraint(surface, pointer, |constraint| {
|
||||
constraint.unwrap().activate();
|
||||
|
|
|
|||
|
|
@ -304,9 +304,11 @@ impl XdgShellHandler for State {
|
|||
if should_focus {
|
||||
Shell::set_focus(self, Some(&target), &seat, None, true);
|
||||
}
|
||||
} else if let Some(pending) = shell.pending_windows.iter_mut().find(|pending| {
|
||||
pending.surface.wl_surface().as_deref() == Some(surface.wl_surface())
|
||||
}) {
|
||||
} else if let Some(pending) = shell
|
||||
.pending_windows
|
||||
.iter_mut()
|
||||
.find(|pending| pending.surface.wl_surface().as_deref() == Some(surface.wl_surface()))
|
||||
{
|
||||
pending.fullscreen.take();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ mod handlers;
|
|||
pub fn head_is_enabled(output: &Output) -> bool {
|
||||
output
|
||||
.user_data()
|
||||
.get::<OutputState>().is_some_and(|inner| inner.lock().unwrap().enabled)
|
||||
.get::<OutputState>()
|
||||
.is_some_and(|inner| inner.lock().unwrap().enabled)
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
|||
|
|
@ -800,7 +800,9 @@ where
|
|||
_dhandle: &DisplayHandle,
|
||||
data_init: &mut DataInit<'_, D>,
|
||||
) {
|
||||
if let ext_image_copy_capture_cursor_session_v1::Request::GetCaptureSession { session } = request {
|
||||
if let ext_image_copy_capture_cursor_session_v1::Request::GetCaptureSession { session } =
|
||||
request
|
||||
{
|
||||
let new_data = CursorSessionData {
|
||||
inner: data.inner.clone(),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue