Merge pull request #488 from tomaka/rem-is-closed
Remove the is_closed function
This commit is contained in:
commit
7773996d7b
17 changed files with 72 additions and 176 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue