summaryrefslogtreecommitdiffstats
path: root/rsnix/src/gop.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--rsnix/src/gop.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/rsnix/src/gop.rs b/rsnix/src/gop.rs
index deff226..cddad22 100644
--- a/rsnix/src/gop.rs
+++ b/rsnix/src/gop.rs
@@ -104,6 +104,25 @@ pub fn qr_locked() -> bool {
104 QR_LOCKED.load(Ordering::Relaxed) 104 QR_LOCKED.load(Ordering::Relaxed)
105} 105}
106 106
107/// Hook invoked after the console scrolls, so the window manager can
108/// re-composite GUI windows (which sit above the console layer in the
109/// shadow and must not scroll with it).
110fn scroll_hook_noop() {}
111
112static mut SCROLL_HOOK: fn() = scroll_hook_noop;
113
114pub fn set_scroll_hook(f: fn()) {
115 unsafe {
116 SCROLL_HOOK = f;
117 }
118}
119
120pub(crate) fn call_scroll_hook() {
121 unsafe {
122 SCROLL_HOOK();
123 }
124}
125
107#[inline] 126#[inline]
108fn stall_display() { 127fn stall_display() {
109 let n = DISPLAY_STALL.load(Ordering::Relaxed); 128 let n = DISPLAY_STALL.load(Ordering::Relaxed);