pub struct XdgToplevelDragV1 { /* private fields */ }Expand description
Object representing a toplevel move during a drag
This interface has no events.
Implementations§
Source§impl XdgToplevelDragV1
impl XdgToplevelDragV1
Sourcepub fn destroy(&self)
pub fn destroy(&self)
destroy an xdg_toplevel_drag_v1 object
Destroy this xdg_toplevel_drag_v1 object. This request must only be called after the underlying wl_data_source drag has ended, as indicated by the dnd_drop_performed or cancelled events. In any other case an ongoing_drag error is raised.
Sourcepub fn attach(&self, toplevel: &XdgToplevel, x_offset: i32, y_offset: i32)
pub fn attach(&self, toplevel: &XdgToplevel, x_offset: i32, y_offset: i32)
Move a toplevel with the drag operation
Request that the window will be moved with the cursor during the drag operation. The offset is a hint to the compositor how the toplevel should be positioned relative to the cursor hotspot in surface local coordinates and relative to the geometry of the toplevel being attached. See xdg_surface.set_window_geometry. For example it might only be used when an unmapped window is attached. The attached window does not participate in the selection of the drag target.
If the toplevel is unmapped while it is attached, it is automatically detached from the drag. In this case this request has to be called again if the window should be attached after it is remapped.
This request can be called multiple times but issuing it while a toplevel with an active role is attached raises a toplevel_attached error.
Trait Implementations§
Source§impl Borrow<ObjectId> for XdgToplevelDragV1
impl Borrow<ObjectId> for XdgToplevelDragV1
Source§impl Clone for XdgToplevelDragV1
impl Clone for XdgToplevelDragV1
Source§fn clone(&self) -> XdgToplevelDragV1
fn clone(&self) -> XdgToplevelDragV1
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more