From ba14440a4937f3625670e7112c740db1787285eb Mon Sep 17 00:00:00 2001 From: Imbris Date: Sun, 26 Jul 2020 18:21:20 -0400 Subject: [PATCH] Fix filtering out resize events in the ui --- voxygen/src/ui/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/voxygen/src/ui/mod.rs b/voxygen/src/ui/mod.rs index 21d490c799..b1a7f941ec 100644 --- a/voxygen/src/ui/mod.rs +++ b/voxygen/src/ui/mod.rs @@ -239,8 +239,10 @@ impl Ui { pub fn handle_event(&mut self, event: Event) { match event.0 { - Input::Resize(w, h) if w > 1.0 && h > 1.0 => { - self.window_resized = Some(Vec2::new(w, h)) + Input::Resize(w, h) => { + if w > 1.0 && h > 1.0 { + self.window_resized = Some(Vec2::new(w, h)) + } }, Input::Touch(touch) => self.ui.handle_event(Input::Touch(Touch { xy: self.scale.scale_point(touch.xy.into()).into_array(), @@ -459,7 +461,7 @@ impl Ui { || image_h == 0 || source_w < 1.0 || source_h < 1.0 - || gl_size.reduce_partial_max() < f32::EPSILON + || gl_size.reduce_partial_min() < f32::EPSILON { None } else {