mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 07:33:14 -04:00
Add missing get_api stubs.
Add hidpi_factor() support for retina displays. Fix Resize and MouseMoved events to handle retina displays. Fix inverted y position for MouseMoved events on mac. Fix initial painting on retina display.
This commit is contained in:
@@ -63,6 +63,10 @@ impl HeadlessContext {
|
||||
pub fn get_proc_address(&self, _addr: &str) -> *const () {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn get_api(&self) -> ::Api {
|
||||
::Api::OpenGl
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "headless")]
|
||||
@@ -284,6 +288,10 @@ impl Window {
|
||||
|
||||
pub fn set_cursor(&self, _: MouseCursor) {
|
||||
}
|
||||
|
||||
pub fn hidpi_factor(&self) -> f32 {
|
||||
1.0
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for Window {}
|
||||
|
||||
Reference in New Issue
Block a user