Skip to content

Commit 0ed4925

Browse files
authored
Introduce Window::start_interactive_move. (#174)
1 parent 618d0be commit 0ed4925

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
#### Additions
6+
7+
- `Window::start_interactive_move` to enable dragging the window with a user action
8+
59
## 0.12.2 -- 2020-12-30
610

711
#### Changes

src/window/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,20 @@ impl<F: Frame + 'static> Window<F> {
669669
pub fn set_frame_config(&mut self, config: F::Config) {
670670
self.frame.borrow_mut().set_config(config)
671671
}
672+
673+
/// Start an interactive, user-driven move of the surface
674+
///
675+
/// This request must be used in response to some sort of user action
676+
/// like a button press, key press, or touch down event. The passed
677+
/// serial is used to determine the type of interactive move (touch,
678+
/// pointer, etc).
679+
///
680+
/// The server may ignore move requests depending on the state of
681+
/// the surface (e.g. fullscreen or maximized), or if the passed serial
682+
/// is no longer valid.
683+
pub fn start_interactive_move(&self, seat: &wl_seat::WlSeat, serial: u32) {
684+
self.shell_surface.move_(seat, serial);
685+
}
672686
}
673687

674688
impl<F: Frame> Drop for Window<F> {

0 commit comments

Comments
 (0)