Merge pull request #576 from retep998/master

Cleanup unused import stuff
This commit is contained in:
tomaka 2015-08-21 18:24:12 +02:00
commit 73e4a7d4b1
4 changed files with 18 additions and 17 deletions

View file

@ -57,6 +57,14 @@ user32-sys = "~0.1.1"
kernel32-sys = "0.1"
dwmapi-sys = "0.1"
[target.i686-pc-windows-msvc.dependencies]
winapi = "0.2"
shell32-sys = "0.1"
gdi32-sys = "0.1"
user32-sys = "~0.1.1"
kernel32-sys = "0.1"
dwmapi-sys = "0.1"
[target.x86_64-pc-windows-gnu.dependencies]
winapi = "0.2"
shell32-sys = "0.1"

View file

@ -230,7 +230,7 @@ pub unsafe extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT,
let cstash = cstash.as_ref();
// there's a very bizarre borrow checker bug
// possibly related to rust-lang/rust/#23338
let cursor_state = if let Some(cstash) = cstash {
let _cursor_state = if let Some(cstash) = cstash {
if let Ok(cursor_state) = cstash.cursor_state.lock() {
match *cursor_state {
CursorState::Normal => {
@ -256,7 +256,7 @@ pub unsafe extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT,
use events::Event::DroppedFile;
let hdrop = wparam as winapi::HDROP;
let mut pathbuf: [u16; winapi::MAX_PATH] = unsafe { mem::uninitialized() };
let mut pathbuf: [u16; winapi::MAX_PATH] = mem::uninitialized();
let num_drops = shell32::DragQueryFileW(hdrop, 0xFFFFFFFF, ptr::null_mut(), 0);
for i in 0..num_drops {

View file

@ -1,10 +1,8 @@
use std::sync::atomic::AtomicBool;
use std::sync::{Arc, Mutex};
use std::io;
use std::ptr;
use std::mem;
use std::thread;
use libc;
use super::callback;
use super::Window;
@ -19,7 +17,7 @@ use CreationError::OsError;
use CursorState;
use GlRequest;
use std::ffi::{CString, OsStr};
use std::ffi::{OsStr};
use std::os::windows::ffi::OsStrExt;
use std::sync::mpsc::channel;
@ -28,7 +26,6 @@ use kernel32;
use dwmapi;
use user32;
use api::wgl;
use api::wgl::Context as WglContext;
use api::egl;
use api::egl::Context as EglContext;
@ -163,7 +160,7 @@ unsafe fn init(title: Vec<u16>, builder: BuilderAttribs<'static>,
// creating the OpenGL context
let context = match builder.gl_version {
GlRequest::Specific(Api::OpenGlEs, (major, minor)) => {
GlRequest::Specific(Api::OpenGlEs, (_major, _minor)) => {
if let Some(egl) = egl {
if let Ok(c) = EglContext::new(egl, &builder,
egl::NativeDisplay::Other(Some(ptr::null())))
@ -214,10 +211,8 @@ unsafe fn init(title: Vec<u16>, builder: BuilderAttribs<'static>,
fTransitionOnMaximized: 0,
};
unsafe {
dwmapi::DwmEnableBlurBehindWindow(real_window.0, &bb);
}
}
// calling SetForegroundWindow if fullscreen
if builder.monitor.is_some() {

View file

@ -1,6 +1,5 @@
#![cfg(target_os = "windows")]
use std::sync::atomic::AtomicBool;
use std::mem;
use std::ptr;
use std::ffi::OsStr;
@ -26,7 +25,6 @@ use winapi;
use user32;
use kernel32;
use api::wgl;
use api::wgl::Context as WglContext;
use api::egl::Context as EglContext;
use api::egl::ffi::egl::Egl;