Rename Window::set_inner_size to Window::request_inner_size
Some systems could resize the window immediately and we'd rather inform the users right away if that was the case, so they could create e.g. EGLSurface without waiting for resize, which is really important for Wayland. Fixes #2868.
This commit is contained in:
parent
42e492cde8
commit
ff0ce9d065
13 changed files with 65 additions and 41 deletions
|
|
@ -608,9 +608,10 @@ impl WinitWindow {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_inner_size(&self, size: Size) {
|
||||
pub fn request_inner_size(&self, size: Size) -> Option<PhysicalSize<u32>> {
|
||||
let scale_factor = self.scale_factor();
|
||||
util::set_content_size_sync(self, size.to_logical(scale_factor));
|
||||
None
|
||||
}
|
||||
|
||||
pub fn set_min_inner_size(&self, dimensions: Option<Size>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue