summaryrefslogtreecommitdiffstats
path: root/rsnix/src/wm.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--rsnix/src/wm.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/rsnix/src/wm.rs b/rsnix/src/wm.rs
index 1326696..be74f9a 100644
--- a/rsnix/src/wm.rs
+++ b/rsnix/src/wm.rs
@@ -90,8 +90,6 @@ pub fn init() {
90 CASCADE_Y = 0; 90 CASCADE_Y = 0;
91 } 91 }
92 FOCUSED.store(CONSOLE, Ordering::Relaxed); 92 FOCUSED.store(CONSOLE, Ordering::Relaxed);
93 // When the console scrolls, re-composite windows so they stay put.
94 gop::set_scroll_hook(redraw_windows);
95} 93}
96 94
97/// The focused window, or `None` if the console has focus. 95/// The focused window, or `None` if the console has focus.
@@ -663,20 +661,6 @@ pub fn spawn_input_pump() -> Option<usize> {
663 crate::sched::spawn(pump_main, "wm-input") 661 crate::sched::spawn(pump_main, "wm-input")
664} 662}
665 663
666/// Re-composite every visible window. Called after the console scrolls so
667/// windows stay in place while the text layer beneath them shifts.
668pub fn redraw_windows() {
669 unsafe {
670 for i in 0..ZLEN {
671 let id = ZORDER[i];
672 let w = WINDOWS[id];
673 if w.used && w.state == WinState::Visible {
674 composite_rect(w.x, w.y, w.w, w.h + TITLE_BAR_H);
675 }
676 }
677 }
678}
679
680fn pump_main() { 664fn pump_main() {
681 loop { 665 loop {
682 if focused().is_some() { 666 if focused().is_some() {