aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/window_context.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty/src/window_context.rs')
-rw-r--r--alacritty/src/window_context.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/alacritty/src/window_context.rs b/alacritty/src/window_context.rs
index 833586ea..79bc918b 100644
--- a/alacritty/src/window_context.rs
+++ b/alacritty/src/window_context.rs
@@ -7,7 +7,6 @@ use std::mem;
#[cfg(not(windows))]
use std::os::unix::io::{AsRawFd, RawFd};
use std::rc::Rc;
-#[cfg(not(any(target_os = "macos", windows)))]
use std::sync::atomic::Ordering;
use std::sync::Arc;
@@ -478,9 +477,8 @@ impl WindowContext {
self.mouse.hint_highlight_dirty = false;
}
- // Skip rendering on Wayland until we get frame event from compositor.
- #[cfg(not(any(target_os = "macos", windows)))]
- if self.display.is_wayland && !self.display.window.should_draw.load(Ordering::Relaxed) {
+ // Skip rendering until we get a new frame.
+ if !self.display.window.has_frame.load(Ordering::Relaxed) {
return;
}
@@ -495,8 +493,14 @@ impl WindowContext {
self.display.window.request_redraw();
}
- // Redraw screen.
- self.display.draw(terminal, &self.message_buffer, &self.config, &self.search_state);
+ // Redraw the window.
+ self.display.draw(
+ terminal,
+ scheduler,
+ &self.message_buffer,
+ &self.config,
+ &self.search_state,
+ );
}
}