Added fullscreen support for X11
This commit is contained in:
parent
ac74db979c
commit
55ebd4935e
2 changed files with 6 additions and 3 deletions
|
|
@ -129,7 +129,7 @@ impl Window {
|
|||
};
|
||||
|
||||
let mut window_attributes = ffi::CWBorderPixel | ffi::CWColormap | ffi:: CWEventMask;
|
||||
if builder.monitor.is_some() {
|
||||
if builder.is_fullscreen {
|
||||
window_attributes |= ffi::CWOverrideRedirect;
|
||||
unsafe {
|
||||
ffi::XF86VidModeSwitchToMode(display, screen_id, *modes.offset(best_mode as int));
|
||||
|
|
@ -140,7 +140,7 @@ impl Window {
|
|||
|
||||
// finally creating the window
|
||||
let window = unsafe {
|
||||
let win = ffi::XCreateWindow(display, root, 0, 0, dimensions.val0() as libc::c_uint,
|
||||
let win = ffi::XCreateWindow(display, root, 50, 50, dimensions.val0() as libc::c_uint,
|
||||
dimensions.val1() as libc::c_uint, 0, visual_infos.depth, ffi::InputOutput,
|
||||
visual_infos.visual, window_attributes,
|
||||
&mut set_win_attr);
|
||||
|
|
@ -251,7 +251,7 @@ impl Window {
|
|||
wm_delete_window: wm_delete_window,
|
||||
xf86_desk_mode: xf86_desk_mode,
|
||||
screen_id: screen_id,
|
||||
is_fullscreen: builder.monitor.is_some(),
|
||||
is_fullscreen: builder.is_fullscreen,
|
||||
};
|
||||
|
||||
// calling glViewport
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue