grabs: Add ReleaseMode for menu-initiated grabs

This commit is contained in:
Victoria Brekenfeld 2023-12-07 19:49:53 +00:00 committed by Victoria Brekenfeld
parent 85771dff5e
commit edfb0edda7
11 changed files with 206 additions and 81 deletions

View file

@ -1,5 +1,5 @@
use crate::{
shell::Shell,
shell::{grabs::ReleaseMode, Shell},
state::State,
utils::{
iced::{IcedElement, Program},
@ -255,7 +255,13 @@ impl Program for CosmicWindowInternal {
if let Some((seat, serial)) = self.last_seat.lock().unwrap().clone() {
if let Some(surface) = self.window.wl_surface() {
loop_handle.insert_idle(move |state| {
Shell::move_request(state, &surface, &seat, serial);
Shell::move_request(
state,
&surface,
&seat,
serial,
ReleaseMode::NoMouseButtons,
);
});
}
}