mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
Make use of new DndGrabHandler::cancelled()
This commit is contained in:
+7
-1
@@ -384,10 +384,16 @@ impl DndGrabHandler for State {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn cancelled(&mut self, _seat: Seat<Self>, _location: Point<f64, Logical>) {
|
||||
trace!("dnd cancelled");
|
||||
|
||||
self.niri.on_maybe_dnd_ended();
|
||||
}
|
||||
}
|
||||
|
||||
impl crate::niri::Niri {
|
||||
pub fn on_maybe_dnd_ended(&mut self) {
|
||||
fn on_maybe_dnd_ended(&mut self) {
|
||||
self.layout.dnd_end();
|
||||
self.dnd_icon = None;
|
||||
// FIXME: more granular
|
||||
|
||||
@@ -499,11 +499,6 @@ impl State {
|
||||
.unwrap_or(false)
|
||||
{
|
||||
pointer.unset_grab(this, serial, time);
|
||||
|
||||
// If this was a DnD, we won't get DndGrabHandler::dropped(), so we need to
|
||||
// call the cleanup.
|
||||
this.niri.on_maybe_dnd_ended();
|
||||
|
||||
this.niri.suppressed_keys.insert(key_code);
|
||||
return FilterResult::Intercept(None);
|
||||
}
|
||||
|
||||
@@ -1321,7 +1321,6 @@ impl State {
|
||||
get_monotonic_time().as_millis() as u32,
|
||||
);
|
||||
self.niri.popup_grab = None;
|
||||
self.niri.on_maybe_dnd_ended();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1977,7 +1976,6 @@ impl State {
|
||||
if let Some(touch) = self.niri.seat.get_touch() {
|
||||
touch.unset_grab(self);
|
||||
}
|
||||
self.niri.on_maybe_dnd_ended();
|
||||
|
||||
self.backend.with_primary_renderer(|renderer| {
|
||||
self.niri
|
||||
|
||||
Reference in New Issue
Block a user