Remove the is_closed function
This commit is contained in:
parent
eb73c2514e
commit
39128dd7e1
17 changed files with 72 additions and 176 deletions
|
|
@ -263,9 +263,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);
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue