aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ri/river-mk-keymap/src/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ri/river-mk-keymap/src/wayland')
-rw-r--r--pkgs/by-name/ri/river-mk-keymap/src/wayland/dispatches.rs5
-rw-r--r--pkgs/by-name/ri/river-mk-keymap/src/wayland/mod.rs2
-rw-r--r--pkgs/by-name/ri/river-mk-keymap/src/wayland/render/layout.rs2
-rw-r--r--pkgs/by-name/ri/river-mk-keymap/src/wayland/render/mod.rs8
-rw-r--r--pkgs/by-name/ri/river-mk-keymap/src/wayland/river/protocols.rs2
-rw-r--r--pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/multi.rs4
-rw-r--r--pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/raw.rs2
-rw-r--r--pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/slot.rs11
8 files changed, 17 insertions, 19 deletions
diff --git a/pkgs/by-name/ri/river-mk-keymap/src/wayland/dispatches.rs b/pkgs/by-name/ri/river-mk-keymap/src/wayland/dispatches.rs
index c6e04fdf..5bdf9d3d 100644
--- a/pkgs/by-name/ri/river-mk-keymap/src/wayland/dispatches.rs
+++ b/pkgs/by-name/ri/river-mk-keymap/src/wayland/dispatches.rs
@@ -2,12 +2,12 @@ use std::num::NonZero;
use keymaps::key_repr::Key;
use wayland_client::{
+ Connection, Dispatch, QueueHandle,
globals::GlobalListContents,
protocol::{
wl_buffer::WlBuffer, wl_compositor::WlCompositor, wl_registry, wl_seat::WlSeat,
wl_shm::WlShm, wl_shm_pool::WlShmPool, wl_surface::WlSurface,
},
- Connection, Dispatch, QueueHandle,
};
use wayland_protocols_wlr::layer_shell::v1::client::{
@@ -16,12 +16,11 @@ use wayland_protocols_wlr::layer_shell::v1::client::{
};
use crate::wayland::{
- ansi, render,
+ AppData, ansi, render,
river::protocols::river_protocols::{
zriver_seat_status_v1::{self, ZriverSeatStatusV1},
zriver_status_manager_v1::ZriverStatusManagerV1,
},
- AppData,
};
impl Dispatch<ZriverSeatStatusV1, ()> for AppData {
diff --git a/pkgs/by-name/ri/river-mk-keymap/src/wayland/mod.rs b/pkgs/by-name/ri/river-mk-keymap/src/wayland/mod.rs
index 44c010d5..2b37e9b5 100644
--- a/pkgs/by-name/ri/river-mk-keymap/src/wayland/mod.rs
+++ b/pkgs/by-name/ri/river-mk-keymap/src/wayland/mod.rs
@@ -7,6 +7,7 @@
use anyhow::Result;
use wayland_client::{
+ Connection,
globals::registry_queue_init,
protocol::{
wl_compositor::WlCompositor,
@@ -14,7 +15,6 @@ use wayland_client::{
wl_shm::{self, WlShm},
wl_surface::WlSurface,
},
- Connection,
};
use wayland_protocols_wlr::layer_shell::v1::client::{
zwlr_layer_shell_v1::{self, ZwlrLayerShellV1},
diff --git a/pkgs/by-name/ri/river-mk-keymap/src/wayland/render/layout.rs b/pkgs/by-name/ri/river-mk-keymap/src/wayland/render/layout.rs
index 7f0aaec9..032e98a4 100644
--- a/pkgs/by-name/ri/river-mk-keymap/src/wayland/render/layout.rs
+++ b/pkgs/by-name/ri/river-mk-keymap/src/wayland/render/layout.rs
@@ -1,4 +1,4 @@
-use ab_glyph::{point, Font, Glyph, Point, ScaleFont};
+use ab_glyph::{Font, Glyph, Point, ScaleFont, point};
use crate::wayland::ansi::{StyledChar, StyledString};
diff --git a/pkgs/by-name/ri/river-mk-keymap/src/wayland/render/mod.rs b/pkgs/by-name/ri/river-mk-keymap/src/wayland/render/mod.rs
index e92def3c..fa44f602 100644
--- a/pkgs/by-name/ri/river-mk-keymap/src/wayland/render/mod.rs
+++ b/pkgs/by-name/ri/river-mk-keymap/src/wayland/render/mod.rs
@@ -1,6 +1,6 @@
use std::{fs::File, io::Read};
-use ab_glyph::{point, Font, FontVec, PxScale, ScaleFont};
+use ab_glyph::{Font, FontVec, PxScale, ScaleFont, point};
use anyhow::{Context, Result};
use font_kit::{
family_name::FamilyName, handle::Handle, properties::Properties, source::SystemSource,
@@ -76,11 +76,7 @@ pub(super) fn text(input: &StyledString) -> Result<(ColorVec, (u32, u32))> {
scaled_font.h_advance(g.id)
};
- if next > acc {
- next
- } else {
- acc
- }
+ if next > acc { next } else { acc }
})
.ceil() as usize;
diff --git a/pkgs/by-name/ri/river-mk-keymap/src/wayland/river/protocols.rs b/pkgs/by-name/ri/river-mk-keymap/src/wayland/river/protocols.rs
index e54b65e1..29f5aabe 100644
--- a/pkgs/by-name/ri/river-mk-keymap/src/wayland/river/protocols.rs
+++ b/pkgs/by-name/ri/river-mk-keymap/src/wayland/river/protocols.rs
@@ -12,7 +12,7 @@ pub(crate) mod river_protocols {
pub(crate) mod __status {
use wayland_client::backend as wayland_backend;
use wayland_client::protocol::__interfaces::{
- wl_output_interface, wl_seat_interface, WL_OUTPUT_INTERFACE, WL_SEAT_INTERFACE,
+ WL_OUTPUT_INTERFACE, WL_SEAT_INTERFACE, wl_output_interface, wl_seat_interface,
};
wayland_scanner::generate_interfaces!("./resources/river-status-unstable-v1.xml");
}
diff --git a/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/multi.rs b/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/multi.rs
index 0b1fdc1b..db0e06c1 100644
--- a/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/multi.rs
+++ b/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/multi.rs
@@ -68,14 +68,14 @@ use std::io;
use std::os::unix::io::OwnedFd;
use std::sync::{
- atomic::{AtomicBool, Ordering},
Arc,
+ atomic::{AtomicBool, Ordering},
};
use wayland_client::backend::protocol::Message;
use wayland_client::backend::{Backend, ObjectData, ObjectId};
use wayland_client::{
- protocol::{wl_buffer, wl_shm},
Proxy,
+ protocol::{wl_buffer, wl_shm},
};
use crate::wayland::shm::CreatePoolError;
diff --git a/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/raw.rs b/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/raw.rs
index a12afaa0..3f4416de 100644
--- a/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/raw.rs
+++ b/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/raw.rs
@@ -18,9 +18,9 @@ use std::{
use memmap2::MmapMut;
use wayland_client::{
+ Dispatch, Proxy, QueueHandle, WEnum,
backend::ObjectData,
protocol::{wl_buffer, wl_shm, wl_shm_pool},
- Dispatch, Proxy, QueueHandle, WEnum,
};
use super::CreatePoolError;
diff --git a/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/slot.rs b/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/slot.rs
index ab52c5f6..1f70c0e9 100644
--- a/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/slot.rs
+++ b/pkgs/by-name/ri/river-mk-keymap/src/wayland/shm/slot.rs
@@ -4,20 +4,20 @@ use std::io;
use std::{
os::unix::io::{AsRawFd, OwnedFd},
sync::{
- atomic::{AtomicU8, AtomicUsize, Ordering},
Arc, Mutex, Weak,
+ atomic::{AtomicU8, AtomicUsize, Ordering},
},
};
use wayland_client::backend::protocol::Message;
use wayland_client::backend::{ObjectData, ObjectId};
use wayland_client::{
- protocol::{wl_buffer, wl_shm, wl_surface},
Proxy,
+ protocol::{wl_buffer, wl_shm, wl_surface},
};
-use crate::wayland::shm::raw::RawPool;
use crate::wayland::shm::CreatePoolError;
+use crate::wayland::shm::raw::RawPool;
#[derive(Debug, thiserror::Error)]
pub(crate) enum CreateBufferError {
@@ -420,7 +420,10 @@ impl Buffer {
/// Note: if you need to ensure that [`canvas()`](Buffer::canvas) calls never return data that
/// could be attached to a surface in a multi-threaded client, make this call while you have
/// exclusive access to the corresponding [`SlotPool`].
- pub(crate) fn attach_to(&self, surface: &wl_surface::WlSurface) -> Result<(), ActivateSlotError> {
+ pub(crate) fn attach_to(
+ &self,
+ surface: &wl_surface::WlSurface,
+ ) -> Result<(), ActivateSlotError> {
self.activate()?;
surface.attach(Some(&self.inner), 0, 0);
Ok(())