mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 05:40:04 -04:00
Merge pull request #40 from DavidPartouche/master
Use the correct monitor when fullscreen for X11
This commit is contained in:
@@ -35,8 +35,9 @@ impl Window {
|
|||||||
display
|
display
|
||||||
};
|
};
|
||||||
|
|
||||||
let screen_id = unsafe {
|
let screen_id = match builder.monitor {
|
||||||
ffi::XDefaultScreen(display)
|
Some(MonitorID(monitor)) => monitor as i32,
|
||||||
|
None => unsafe { ffi::XDefaultScreen(display) },
|
||||||
};
|
};
|
||||||
|
|
||||||
// getting the FBConfig
|
// getting the FBConfig
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use std::{ptr};
|
use std::{ptr};
|
||||||
use super::ffi;
|
use super::ffi;
|
||||||
|
|
||||||
pub struct MonitorID(uint);
|
pub struct MonitorID(pub uint);
|
||||||
|
|
||||||
pub fn get_available_monitors() -> Vec<MonitorID> {
|
pub fn get_available_monitors() -> Vec<MonitorID> {
|
||||||
let nb_monitors = unsafe {
|
let nb_monitors = unsafe {
|
||||||
|
|||||||
Reference in New Issue
Block a user