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:
Kirill Chibisov 2023-07-10 04:02:26 +00:00 committed by GitHub
parent 42e492cde8
commit ff0ce9d065
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 65 additions and 41 deletions

View file

@ -367,8 +367,8 @@ impl Window {
}
#[inline]
pub fn set_inner_size(&self, size: Size) {
x11_or_wayland!(match self; Window(w) => w.set_inner_size(size))
pub fn request_inner_size(&self, size: Size) -> Option<PhysicalSize<u32>> {
x11_or_wayland!(match self; Window(w) => w.request_inner_size(size))
}
#[inline]