aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2014-09-20 11:26:10 +0200
committertomaka <pierre.krieger1708@gmail.com>2014-09-20 11:26:10 +0200
commit795d04c123312a623306d1ddfa24f2becaa4bae3 (patch)
tree1a9eb4d983e4619a99123d017a00cc47e6b68e15 /src/x11
parent3ac5f6d115afa3907047a8a55b58c698b47d3b28 (diff)
parent6d3d84ef753b4e998221290acc1b72a75d3ff8a5 (diff)
downloadglutin-795d04c123312a623306d1ddfa24f2becaa4bae3.tar.gz
glutin-795d04c123312a623306d1ddfa24f2becaa4bae3.zip
Merge pull request #40 from DavidPartouche/master
Use the correct monitor when fullscreen for X11
Diffstat (limited to 'src/x11')
-rw-r--r--src/x11/mod.rs5
-rw-r--r--src/x11/monitor.rs2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/x11/mod.rs b/src/x11/mod.rs
index 0f5f557..315c2b3 100644
--- a/src/x11/mod.rs
+++ b/src/x11/mod.rs
@@ -35,8 +35,9 @@ impl Window {
display
};
- let screen_id = unsafe {
- ffi::XDefaultScreen(display)
+ let screen_id = match builder.monitor {
+ Some(MonitorID(monitor)) => monitor as i32,
+ None => unsafe { ffi::XDefaultScreen(display) },
};
// getting the FBConfig
diff --git a/src/x11/monitor.rs b/src/x11/monitor.rs
index f1b861b..3b382c2 100644
--- a/src/x11/monitor.rs
+++ b/src/x11/monitor.rs
@@ -1,7 +1,7 @@
use std::{ptr};
use super::ffi;
-pub struct MonitorID(uint);
+pub struct MonitorID(pub uint);
pub fn get_available_monitors() -> Vec<MonitorID> {
let nb_monitors = unsafe {