aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/x11
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-06-17 07:36:16 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-06-17 07:36:16 +0200
commit7773996d7b103e4e057cd547c0666e5d5834416f (patch)
tree292b9dc3717c10b9435b14b04b0a590b8b524ac3 /src/api/x11
parent90b28c205219df732d83e403f98abab31e6e52d4 (diff)
parent39128dd7e11ffa05eb06933cb6e3ce0e750e8806 (diff)
downloadglutin-7773996d7b103e4e057cd547c0666e5d5834416f.tar.gz
glutin-7773996d7b103e4e057cd547c0666e5d5834416f.zip
Merge pull request #488 from tomaka/rem-is-closed
Remove the is_closed function
Diffstat (limited to 'src/api/x11')
-rw-r--r--src/api/x11/window.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs
index c0c5917..dc24e38 100644
--- a/src/api/x11/window.rs
+++ b/src/api/x11/window.rs
@@ -264,9 +264,10 @@ impl<'a> Iterator for WaitEventsIterator<'a> {
type Item = Event;
fn next(&mut self) -> Option<Event> {
+ 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);
}
@@ -597,11 +598,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);