Commit 9c1b592a authored by Andrew Plaza's avatar Andrew Plaza
Browse files

Changed Exit flag to 'Unclosable'

parent f60b2c16
...@@ -85,12 +85,12 @@ impl Window { ...@@ -85,12 +85,12 @@ impl Window {
pub fn new_flags(x: i32, y: i32, w: u32, h: u32, title: &str, flags: &[WindowFlag]) -> Option<Self> { pub fn new_flags(x: i32, y: i32, w: u32, h: u32, title: &str, flags: &[WindowFlag]) -> Option<Self> {
let mut async = false; let mut async = false;
let mut resizable = false; let mut resizable = false;
let mut exit = true; let mut unclosable = false;
for &flag in flags.iter() { for &flag in flags.iter() {
match flag { match flag {
WindowFlag::Async => async = true, WindowFlag::Async => async = true,
WindowFlag::Resizable => resizable = true, WindowFlag::Resizable => resizable = true,
WindowFlag::Exit => exit = false WindowFlag::Unclosable => unclosable = true
} }
} }
...@@ -98,7 +98,7 @@ impl Window { ...@@ -98,7 +98,7 @@ impl Window {
"orbital:{}{}{}/{}/{}/{}/{}/{}", "orbital:{}{}{}/{}/{}/{}/{}/{}",
if async { "a" } else { "" }, if async { "a" } else { "" },
if resizable { "r" } else { "" }, if resizable { "r" } else { "" },
if exit == false { "e" } else { "" }, if unclosable { "u" } else { "" },
x, y, w, h, title x, y, w, h, title
)) { )) {
if let Ok(address) = unsafe { syscall::fmap(file.as_raw_fd(), 0, (w * h * 4) as usize) } { if let Ok(address) = unsafe { syscall::fmap(file.as_raw_fd(), 0, (w * h * 4) as usize) } {
......
...@@ -99,12 +99,12 @@ impl Window { ...@@ -99,12 +99,12 @@ impl Window {
let mut async = false; let mut async = false;
let mut resizable = false; let mut resizable = false;
let mut exit = true; let mut unclosable = false;
for &flag in flags.iter() { for &flag in flags.iter() {
match flag { match flag {
WindowFlag::Async => async = true, WindowFlag::Async => async = true,
WindowFlag::Resizable => resizable = true, WindowFlag::Resizable => resizable = true,
WindowFlag::Exit => exit = false, WindowFlag::Unclosable => unclosable = true,
} }
} }
......
...@@ -24,7 +24,7 @@ pub mod renderer; ...@@ -24,7 +24,7 @@ pub mod renderer;
pub enum WindowFlag { pub enum WindowFlag {
Async, Async,
Resizable, Resizable,
Exit Unclosable
} }
#[cfg(target_os = "redox")] #[cfg(target_os = "redox")]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment