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

@ -2,7 +2,7 @@ use std::{ffi::OsString, os::unix::io::OwnedFd};
use crate::{
backend::render::cursor::{load_cursor_theme, Cursor, CursorShape},
shell::{focus::target::KeyboardFocusTarget, CosmicSurface, Shell},
shell::{focus::target::KeyboardFocusTarget, grabs::ReleaseMode, CosmicSurface, Shell},
state::State,
utils::prelude::*,
wayland::{
@ -410,7 +410,7 @@ impl XwmHandler for State {
fn move_request(&mut self, _xwm: XwmId, window: X11Surface, _button: u32) {
if let Some(wl_surface) = window.wl_surface() {
let seat = self.common.last_active_seat().clone();
Shell::move_request(self, &wl_surface, &seat, None)
Shell::move_request(self, &wl_surface, &seat, None, ReleaseMode::NoMouseButtons)
}
}