From 7ea7dbef578ddbe2a9a50da6aab253ba016f1362 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Thu, 6 Oct 2022 20:38:21 +0200 Subject: feat: Add window drag support from winit Exposes access to the winit window's window_drag method as an action. --- winit/src/window.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'winit/src/window.rs') diff --git a/winit/src/window.rs b/winit/src/window.rs index 265139f7..61c9c3fe 100644 --- a/winit/src/window.rs +++ b/winit/src/window.rs @@ -4,6 +4,11 @@ use iced_native::window; pub use window::{Event, Mode}; +/// Begins dragging the window while the left mouse button is held. +pub fn drag() -> Command { + Command::single(command::Action::Window(window::Action::Drag)) +} + /// Resizes the window to the given logical dimensions. pub fn resize(width: u32, height: u32) -> Command { Command::single(command::Action::Window(window::Action::Resize { -- cgit