shell: Add window menu

This commit is contained in:
Victoria Brekenfeld 2023-12-07 19:53:41 +00:00 committed by Victoria Brekenfeld
parent edfb0edda7
commit 8c4d77e43c
14 changed files with 1591 additions and 32 deletions

View file

@ -17,7 +17,7 @@ use smithay::{
wayland_protocols::xdg::shell::server::xdg_toplevel,
wayland_server::protocol::{wl_output::WlOutput, wl_seat::WlSeat},
},
utils::Serial,
utils::{Logical, Point, Serial},
wayland::{
seat::WaylandFocus,
shell::xdg::{
@ -359,6 +359,17 @@ impl XdgShellHandler for State {
);
}
}
fn show_window_menu(
&mut self,
surface: ToplevelSurface,
seat: WlSeat,
serial: Serial,
location: Point<i32, Logical>,
) {
let seat = Seat::from_resource(&seat).unwrap();
Shell::menu_request(self, surface.wl_surface(), &seat, serial, location)
}
}
delegate_xdg_shell!(State);