From 39128dd7e11ffa05eb06933cb6e3ce0e750e8806 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 16 Jun 2015 13:48:08 +0200 Subject: Remove the is_closed function --- src/api/x11/window.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/api/x11') diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs index ba0fe52..41b74f5 100644 --- a/src/api/x11/window.rs +++ b/src/api/x11/window.rs @@ -263,9 +263,10 @@ impl<'a> Iterator for WaitEventsIterator<'a> { type Item = Event; fn next(&mut self) -> Option { + use std::sync::atomic::Ordering::Relaxed; use std::mem; - while !self.window.is_closed() { + while !self.window.is_closed.load(Relaxed) { if let Some(ev) = self.window.pending_events.lock().unwrap().pop_front() { return Some(ev); } @@ -596,11 +597,6 @@ impl Window { Ok(window) } - pub fn is_closed(&self) -> bool { - use std::sync::atomic::Ordering::Relaxed; - self.is_closed.load(Relaxed) - } - pub fn set_title(&self, title: &str) { with_c_str(title, |title| unsafe { (self.x.display.xlib.XStoreName)(self.x.display.display, self.x.window, title); -- cgit v1.2.3