diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2023-11-26 11:18:14 +0200 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2023-11-26 11:18:14 +0200 |
| commit | 4b77e8d7dd133e9512256bfe134ed5fa881ec744 (patch) | |
| tree | 86b7bfd01c5f73e14f98092b1e4505c3fc26a049 /src/state.rs | |
| parent | 72214822f36140c71f645591ad9733f6c8411bfc (diff) | |
| download | i3bar-mango-4b77e8d7dd133e9512256bfe134ed5fa881ec744.tar.gz | |
reimplement throttling with frame callbacks
Diffstat (limited to 'src/state.rs')
| -rw-r--r-- | src/state.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/state.rs b/src/state.rs index 6556298..279aac3 100644 --- a/src/state.rs +++ b/src/state.rs @@ -139,7 +139,7 @@ impl State { pub fn draw_all(&mut self, conn: &mut Connection<Self>) { for bar in &mut self.bars { - bar.request_frame(conn); + bar.frame(conn, &mut self.shared_state); } } @@ -210,21 +210,21 @@ impl State { pub fn tags_updated(&mut self, conn: &mut Connection<Self>, output: Option<WlOutput>) { self.for_each_bar(output, |bar, ss| { bar.set_tags(ss.wm_info_provider.get_tags(&bar.output)); - bar.request_frame(conn); + bar.frame(conn, ss); }); } pub fn layout_name_updated(&mut self, conn: &mut Connection<Self>, output: Option<WlOutput>) { self.for_each_bar(output, |bar, ss| { bar.set_layout_name(ss.wm_info_provider.get_layout_name(&bar.output)); - bar.request_frame(conn); + bar.frame(conn, ss); }); } pub fn mode_name_updated(&mut self, conn: &mut Connection<Self>, output: Option<WlOutput>) { self.for_each_bar(output, |bar, ss| { bar.set_mode_name(ss.wm_info_provider.get_mode_name(&bar.output)); - bar.request_frame(conn); + bar.frame(conn, ss); }); } } |
