summaryrefslogtreecommitdiffstats
path: root/winit
diff options
context:
space:
mode:
authorLibravatar Yiğit Özdemir <yigitozdemir1299@gmail.com>2023-06-22 18:28:32 +0300
committerLibravatar Yiğit Özdemir <yigitozdemir1299@gmail.com>2023-06-22 18:28:32 +0300
commitb394c84b37eacb266d45663d5d6626f1b616af7e (patch)
tree2f364d9f5896e52d0185668ffe0c8c83bf7d665c /winit
parent21a71b753d6da2233bce913f4e623ee14859ec23 (diff)
downloadiced-b394c84b37eacb266d45663d5d6626f1b616af7e.tar.gz
iced-b394c84b37eacb266d45663d5d6626f1b616af7e.tar.bz2
iced-b394c84b37eacb266d45663d5d6626f1b616af7e.zip
Add FetchSize command - apply the changes discussed at #water-cooler
Diffstat (limited to 'winit')
-rw-r--r--winit/src/application.rs15
1 files changed, 3 insertions, 12 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index ff5afa69..b0824e0e 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -3,7 +3,6 @@
mod profiler;
mod state;
-use iced_graphics::core::window::SizeType;
pub use state::State;
use crate::conversion;
@@ -748,19 +747,11 @@ pub fn run_command<A, E>(
height,
});
}
- window::Action::FetchSize {
- size_type,
- callback,
- } => {
- let width_height = match size_type {
- SizeType::Inner => window.inner_size(),
- SizeType::Outer => window.outer_size(),
- };
- let width_height =
- (width_height.width, width_height.height);
+ window::Action::FetchSize(callback) => {
+ let size = window.inner_size();
proxy
- .send_event(callback(width_height))
+ .send_event(callback((size.width, size.height)))
.expect("Send message to event loop")
}
window::Action::Maximize(maximized) => {