deps: update smithay
This commit is contained in:
parent
204edc67e5
commit
c0892c625d
5 changed files with 37 additions and 20 deletions
|
|
@ -5,7 +5,7 @@ use crate::state::Common;
|
|||
use smithay::{backend::input::KeyState, wayland::seat::keysyms};
|
||||
use smithay::{
|
||||
backend::input::{Device, DeviceCapability, InputBackend, InputEvent},
|
||||
desktop::{layer_map_for_output, Space},
|
||||
desktop::{layer_map_for_output, Space, WindowSurfaceType},
|
||||
reexports::wayland_server::{protocol::wl_surface::WlSurface, Display},
|
||||
utils::{Logical, Point},
|
||||
wayland::{
|
||||
|
|
@ -376,14 +376,21 @@ impl Common {
|
|||
let layer_loc =
|
||||
layers.layer_geometry(layer).unwrap().loc;
|
||||
under = layer
|
||||
.surface_under(pos - layer_loc.to_f64())
|
||||
.surface_under(
|
||||
pos - layer_loc.to_f64(),
|
||||
WindowSurfaceType::ALL,
|
||||
)
|
||||
.map(|(s, _)| s);
|
||||
}
|
||||
} else if let Some(window) = space.window_under(pos).cloned() {
|
||||
let window_loc =
|
||||
space.window_geometry(&window).unwrap().loc;
|
||||
under = window
|
||||
.surface_under(pos - window_loc.to_f64())
|
||||
.surface_under(
|
||||
pos - window_loc.to_f64(),
|
||||
WindowSurfaceType::TOPLEVEL
|
||||
| WindowSurfaceType::SUBSURFACE,
|
||||
)
|
||||
.map(|(s, _)| s);
|
||||
space.raise_window(&window, true);
|
||||
} else if let Some(layer) = layers
|
||||
|
|
@ -394,7 +401,10 @@ impl Common {
|
|||
let layer_loc =
|
||||
layers.layer_geometry(layer).unwrap().loc;
|
||||
under = layer
|
||||
.surface_under(pos - layer_loc.to_f64())
|
||||
.surface_under(
|
||||
pos - layer_loc.to_f64(),
|
||||
WindowSurfaceType::ALL,
|
||||
)
|
||||
.map(|(s, _)| s);
|
||||
}
|
||||
};
|
||||
|
|
@ -511,12 +521,15 @@ impl Common {
|
|||
{
|
||||
let layer_loc = layers.layer_geometry(layer).unwrap().loc;
|
||||
layer
|
||||
.surface_under(pos - output_geo.loc.to_f64() - layer_loc.to_f64())
|
||||
.surface_under(
|
||||
pos - output_geo.loc.to_f64() - layer_loc.to_f64(),
|
||||
WindowSurfaceType::ALL,
|
||||
)
|
||||
.map(|(s, loc)| (s, loc + layer_loc))
|
||||
} else if let Some(window) = space.window_under(pos) {
|
||||
let window_loc = space.window_geometry(window).unwrap().loc;
|
||||
window
|
||||
.surface_under(pos - window_loc.to_f64())
|
||||
.surface_under(pos - window_loc.to_f64(), WindowSurfaceType::ALL)
|
||||
.map(|(s, loc)| (s, loc + window_loc))
|
||||
} else if let Some(layer) = layers
|
||||
.layer_under(WlrLayer::Bottom, pos)
|
||||
|
|
@ -524,7 +537,10 @@ impl Common {
|
|||
{
|
||||
let layer_loc = layers.layer_geometry(layer).unwrap().loc;
|
||||
layer
|
||||
.surface_under(pos - output_geo.loc.to_f64() - layer_loc.to_f64())
|
||||
.surface_under(
|
||||
pos - output_geo.loc.to_f64() - layer_loc.to_f64(),
|
||||
WindowSurfaceType::ALL,
|
||||
)
|
||||
.map(|(s, loc)| (s, loc + layer_loc))
|
||||
} else {
|
||||
None
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use smithay::{
|
|||
utils::{Logical, Point, Rectangle, Size},
|
||||
wayland::{
|
||||
compositor::with_states,
|
||||
seat::{AxisFrame, GrabStartData, PointerGrab, PointerInnerHandle},
|
||||
seat::{AxisFrame, PointerGrab, PointerGrabStartData, PointerInnerHandle},
|
||||
shell::xdg::{SurfaceCachedState, ToplevelConfigure, XdgToplevelSurfaceRoleAttributes},
|
||||
Serial,
|
||||
},
|
||||
|
|
@ -22,7 +22,7 @@ struct MoveData {
|
|||
}
|
||||
|
||||
pub struct MoveSurfaceGrab {
|
||||
start_data: GrabStartData,
|
||||
start_data: PointerGrabStartData,
|
||||
window: Window,
|
||||
initial_window_location: Point<i32, Logical>,
|
||||
}
|
||||
|
|
@ -70,14 +70,14 @@ impl PointerGrab for MoveSurfaceGrab {
|
|||
handle.axis(details)
|
||||
}
|
||||
|
||||
fn start_data(&self) -> &GrabStartData {
|
||||
fn start_data(&self) -> &PointerGrabStartData {
|
||||
&self.start_data
|
||||
}
|
||||
}
|
||||
|
||||
impl MoveSurfaceGrab {
|
||||
pub fn new(
|
||||
start_data: GrabStartData,
|
||||
start_data: PointerGrabStartData,
|
||||
window: Window,
|
||||
initial_window_location: Point<i32, Logical>,
|
||||
) -> MoveSurfaceGrab {
|
||||
|
|
@ -159,7 +159,7 @@ impl Default for ResizeState {
|
|||
}
|
||||
|
||||
pub struct ResizeSurfaceGrab {
|
||||
start_data: GrabStartData,
|
||||
start_data: PointerGrabStartData,
|
||||
window: Window,
|
||||
edges: ResizeEdge,
|
||||
initial_window_size: Size<i32, Logical>,
|
||||
|
|
@ -290,14 +290,14 @@ impl PointerGrab for ResizeSurfaceGrab {
|
|||
handle.axis(details)
|
||||
}
|
||||
|
||||
fn start_data(&self) -> &GrabStartData {
|
||||
fn start_data(&self) -> &PointerGrabStartData {
|
||||
&self.start_data
|
||||
}
|
||||
}
|
||||
|
||||
impl ResizeSurfaceGrab {
|
||||
pub fn new(
|
||||
start_data: GrabStartData,
|
||||
start_data: PointerGrabStartData,
|
||||
window: Window,
|
||||
edges: xdg_toplevel::ResizeEdge,
|
||||
initial_window_geometry: Rectangle<i32, Logical>,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use smithay::{
|
|||
wayland::{
|
||||
compositor::{compositor_init, with_states},
|
||||
output::Output,
|
||||
seat::{GrabStartData, PointerHandle, Seat},
|
||||
seat::{PointerGrabStartData, PointerHandle, Seat},
|
||||
shell::{
|
||||
wlr_layer::{
|
||||
wlr_layer_shell_init, LayerShellRequest, LayerShellState, LayerSurfaceAttributes,
|
||||
|
|
@ -262,7 +262,7 @@ fn check_grab_preconditions(
|
|||
seat: &Seat,
|
||||
surface: Option<&WlSurface>,
|
||||
serial: Serial,
|
||||
) -> Option<(PointerHandle, GrabStartData)> {
|
||||
) -> Option<(PointerHandle, PointerGrabStartData)> {
|
||||
let surface = if let Some(surface) = surface {
|
||||
surface
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue