diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2024-03-22 18:30:08 +0200 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2024-03-22 18:30:08 +0200 |
| commit | d2623c5240824c40947b2ad585f75f362c262f86 (patch) | |
| tree | 6151e4d1b474572155b5ed3e8eb09a138df27d49 /src | |
| parent | 4a6379c7dd1c4a7bae1d16c25021614bea0ba631 (diff) | |
| download | i3bar-mango-d2623c5240824c40947b2ad585f75f362c262f86.tar.gz | |
update deps
Diffstat (limited to 'src')
| -rw-r--r-- | src/bar.rs | 21 | ||||
| -rw-r--r-- | src/main.rs | 4 |
2 files changed, 14 insertions, 11 deletions
@@ -164,15 +164,18 @@ impl Bar { let width_f = self.width as f64; let height_f = self.height as f64; - let (buffer, canvas) = ss.shm.alloc_buffer( - conn, - BufferSpec { - width: pix_width, - height: pix_height, - stride: pix_width * 4, - format: wl_shm::Format::Argb8888, - }, - ); + let (buffer, canvas) = ss + .shm + .alloc_buffer( + conn, + BufferSpec { + width: pix_width, + height: pix_height, + stride: pix_width * 4, + format: wl_shm::Format::Argb8888, + }, + ) + .unwrap(); let cairo_surf = unsafe { cairo::ImageSurface::create_for_data_unsafe( diff --git a/src/main.rs b/src/main.rs index e2395d7..1befd65 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,8 +49,8 @@ fn main() -> anyhow::Result<()> { let mut state = State::new(&mut conn, &globals, &mut el, args.config.as_deref()); conn.flush(IoMode::Blocking)?; - el.register_with_fd(sig_read, move |ctx| { - nix::unistd::read(sig_read, &mut [0; 1])?; + el.register_with_fd(sig_read.as_raw_fd(), move |ctx| { + nix::unistd::read(sig_read.as_raw_fd(), &mut [0; 1])?; ctx.state.toggle_visibility(ctx.conn); Ok(event_loop::Action::Keep) }); |
