From d7fef50ee078ec9b51f1188022b02f0581170ea7 Mon Sep 17 00:00:00 2001 From: kl-botsu Date: Sat, 14 Sep 2024 17:08:56 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20khonsula?= =?UTF-8?q?bs/kludgine@50e4c131b703f5587310587f088a313463a11885=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/kludgine/app/fn.run.html | 2 +- main/kludgine/app/index.html | 2 +- main/kludgine/app/struct.WindowHandle.html | 6 +++--- main/src/kludgine/app.rs.html | 18 +++++++++++++++--- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/main/kludgine/app/fn.run.html b/main/kludgine/app/fn.run.html index 30acb0073..0f8688491 100644 --- a/main/kludgine/app/fn.run.html +++ b/main/kludgine/app/fn.run.html @@ -1,4 +1,4 @@ -run in kludgine::app - Rust

Function kludgine::app::run

source ·
pub fn run<RenderFn>(render_fn: RenderFn) -> Result<(), EventLoopError>
where +run in kludgine::app - Rust

Function kludgine::app::run

source ·
pub fn run<RenderFn>(render_fn: RenderFn) -> Result<(), EventLoopError>
where RenderFn: for<'render, 'gfx, 'window> FnMut(Renderer<'render, 'gfx>, Window<'window>) -> bool + Send + 'static,
Expand description

Runs a callback as a single window. Continues to run until false is returned.

§Errors

diff --git a/main/kludgine/app/index.html b/main/kludgine/app/index.html index 6f9d76716..dabad1d4a 100644 --- a/main/kludgine/app/index.html +++ b/main/kludgine/app/index.html @@ -1,4 +1,4 @@ -kludgine::app - Rust

Module kludgine::app

source ·
Expand description

Application and Windowing Support.

+kludgine::app - Rust

Module kludgine::app

source ·
Expand description

Application and Windowing Support.

Re-exports§

  • pub use appit::winit;

Structs§

Traits§

Functions§

  • Runs a callback as a single window. Continues to run until false is returned.

Type Aliases§

\ No newline at end of file diff --git a/main/kludgine/app/struct.WindowHandle.html b/main/kludgine/app/struct.WindowHandle.html index 344d7ebf4..a5eb8c01a 100644 --- a/main/kludgine/app/struct.WindowHandle.html +++ b/main/kludgine/app/struct.WindowHandle.html @@ -1,12 +1,12 @@ -WindowHandle in kludgine::app - Rust

Struct kludgine::app::WindowHandle

source ·
pub struct WindowHandle<Message = ()>(/* private fields */);
Expand description

A handle to a window.

+WindowHandle in kludgine::app - Rust

Struct kludgine::app::WindowHandle

source ·
pub struct WindowHandle<Message = ()>(/* private fields */);
Expand description

A handle to a window.

This handle does not prevent the window from being closed.

-

Implementations§

source§

impl<Message> WindowHandle<Message>

source

pub fn send(&self, message: Message) -> Result<(), Message>

Sends message to the window. If the message cannot be

+

Implementations§

source§

impl<Message> WindowHandle<Message>

source

pub fn send(&self, message: Message) -> Result<(), Message>

Sends message to the window. If the message cannot be

Returns Ok if the message was successfully sent. The message may not be received even if this function returns Ok, if the window closes between when the message was sent and when the message is received.

§Errors

If the window is already closed, this function returns Err(message).

-

Trait Implementations§

source§

impl<Message> Clone for WindowHandle<Message>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Message: Debug> Debug for WindowHandle<Message>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Message> Freeze for WindowHandle<Message>

§

impl<Message> RefUnwindSafe for WindowHandle<Message>

§

impl<Message> Send for WindowHandle<Message>
where +

Trait Implementations§

source§

impl<Message> Clone for WindowHandle<Message>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Message: Debug> Debug for WindowHandle<Message>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Message> Freeze for WindowHandle<Message>

§

impl<Message> RefUnwindSafe for WindowHandle<Message>

§

impl<Message> Send for WindowHandle<Message>
where Message: Send,

§

impl<Message> Sync for WindowHandle<Message>
where Message: Send,

§

impl<Message> Unpin for WindowHandle<Message>

§

impl<Message> UnwindSafe for WindowHandle<Message>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, diff --git a/main/src/kludgine/app.rs.html b/main/src/kludgine/app.rs.html index af91544b6..3828c787a 100644 --- a/main/src/kludgine/app.rs.html +++ b/main/src/kludgine/app.rs.html @@ -1833,6 +1833,12 @@ 1833 1834 1835 +1836 +1837 +1838 +1839 +1840 +1841

use std::marker::PhantomData;
 use std::num::NonZeroU32;
 use std::path::PathBuf;
@@ -3180,9 +3186,15 @@
 
     fn redraw(&mut self, window: &mut RunningWindow<AppEvent<User>>) {
         if self.config.width > 0 && self.config.height > 0 {
-            let current_size = Size::<UPx>::from(window.inner_size());
-            if current_size != self.kludgine.size() {
-                self.resized(window);
+            #[cfg(target_os = "linux")]
+            {
+                // This is a wayland-only workaround caused by resize events not
+                // being generated from request_inner_size calls. See
+                // <https://github.com/rust-windowing/winit/issues/3919>.
+                let current_size = Size::<UPx>::from(window.inner_size());
+                if current_size != self.kludgine.size() {
+                    self.resized(window);
+                }
             }
             let Some(surface) = self.current_surface_texture(window) else {
                 return;