deps: update smithay

This commit is contained in:
Victoria Brekenfeld 2022-01-25 15:55:40 +01:00
parent 204edc67e5
commit c0892c625d
5 changed files with 37 additions and 20 deletions

5
Cargo.lock generated
View file

@ -1148,7 +1148,7 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
[[package]] [[package]]
name = "smithay" name = "smithay"
version = "0.3.0" version = "0.3.0"
source = "git+https://github.com/Smithay/smithay.git?rev=e019b4fa#e019b4fa9edfd86f6ca559e644185feb1dbc8565" source = "git+https://github.com/Smithay/smithay.git?rev=8558253b#8558253b1395ccee04941778badf1b2869f1597b"
dependencies = [ dependencies = [
"appendlist", "appendlist",
"bitflags", "bitflags",
@ -1204,8 +1204,9 @@ dependencies = [
[[package]] [[package]]
name = "smithay-egui" name = "smithay-egui"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/Smithay/smithay-egui.git?rev=ee254ea5#ee254ea5ef0202bb22228b56c8b1980d3cd4cb5d" source = "git+https://github.com/Smithay/smithay-egui.git?rev=3af730c7#3af730c7e923ce3a3d552205ed491a65447968a1"
dependencies = [ dependencies = [
"cgmath",
"egui", "egui",
"lazy_static", "lazy_static",
"memoffset", "memoffset",

View file

@ -18,13 +18,13 @@ egui = { version = "0.16", optional = true }
[dependencies.smithay] [dependencies.smithay]
version = "0.3" version = "0.3"
git = "https://github.com/Smithay/smithay.git" git = "https://github.com/Smithay/smithay.git"
rev = "e019b4fa" rev = "8558253b"
default-features = false default-features = false
features = ["backend_x11", "backend_egl", "backend_winit", "desktop", "use_system_lib", "renderer_gl", "wayland_frontend", "slog-stdlog"] features = ["backend_x11", "backend_egl", "backend_winit", "desktop", "use_system_lib", "renderer_gl", "wayland_frontend", "slog-stdlog"]
[dependencies.smithay-egui] [dependencies.smithay-egui]
git = "https://github.com/Smithay/smithay-egui.git" git = "https://github.com/Smithay/smithay-egui.git"
rev = "ee254ea5" rev = "3af730c7"
optional = true optional = true
[features] [features]

View file

@ -5,7 +5,7 @@ use crate::state::Common;
use smithay::{backend::input::KeyState, wayland::seat::keysyms}; use smithay::{backend::input::KeyState, wayland::seat::keysyms};
use smithay::{ use smithay::{
backend::input::{Device, DeviceCapability, InputBackend, InputEvent}, 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}, reexports::wayland_server::{protocol::wl_surface::WlSurface, Display},
utils::{Logical, Point}, utils::{Logical, Point},
wayland::{ wayland::{
@ -376,14 +376,21 @@ impl Common {
let layer_loc = let layer_loc =
layers.layer_geometry(layer).unwrap().loc; layers.layer_geometry(layer).unwrap().loc;
under = layer under = layer
.surface_under(pos - layer_loc.to_f64()) .surface_under(
pos - layer_loc.to_f64(),
WindowSurfaceType::ALL,
)
.map(|(s, _)| s); .map(|(s, _)| s);
} }
} else if let Some(window) = space.window_under(pos).cloned() { } else if let Some(window) = space.window_under(pos).cloned() {
let window_loc = let window_loc =
space.window_geometry(&window).unwrap().loc; space.window_geometry(&window).unwrap().loc;
under = window under = window
.surface_under(pos - window_loc.to_f64()) .surface_under(
pos - window_loc.to_f64(),
WindowSurfaceType::TOPLEVEL
| WindowSurfaceType::SUBSURFACE,
)
.map(|(s, _)| s); .map(|(s, _)| s);
space.raise_window(&window, true); space.raise_window(&window, true);
} else if let Some(layer) = layers } else if let Some(layer) = layers
@ -394,7 +401,10 @@ impl Common {
let layer_loc = let layer_loc =
layers.layer_geometry(layer).unwrap().loc; layers.layer_geometry(layer).unwrap().loc;
under = layer under = layer
.surface_under(pos - layer_loc.to_f64()) .surface_under(
pos - layer_loc.to_f64(),
WindowSurfaceType::ALL,
)
.map(|(s, _)| s); .map(|(s, _)| s);
} }
}; };
@ -511,12 +521,15 @@ impl Common {
{ {
let layer_loc = layers.layer_geometry(layer).unwrap().loc; let layer_loc = layers.layer_geometry(layer).unwrap().loc;
layer 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)) .map(|(s, loc)| (s, loc + layer_loc))
} else if let Some(window) = space.window_under(pos) { } else if let Some(window) = space.window_under(pos) {
let window_loc = space.window_geometry(window).unwrap().loc; let window_loc = space.window_geometry(window).unwrap().loc;
window window
.surface_under(pos - window_loc.to_f64()) .surface_under(pos - window_loc.to_f64(), WindowSurfaceType::ALL)
.map(|(s, loc)| (s, loc + window_loc)) .map(|(s, loc)| (s, loc + window_loc))
} else if let Some(layer) = layers } else if let Some(layer) = layers
.layer_under(WlrLayer::Bottom, pos) .layer_under(WlrLayer::Bottom, pos)
@ -524,7 +537,10 @@ impl Common {
{ {
let layer_loc = layers.layer_geometry(layer).unwrap().loc; let layer_loc = layers.layer_geometry(layer).unwrap().loc;
layer 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)) .map(|(s, loc)| (s, loc + layer_loc))
} else { } else {
None None

View file

@ -9,7 +9,7 @@ use smithay::{
utils::{Logical, Point, Rectangle, Size}, utils::{Logical, Point, Rectangle, Size},
wayland::{ wayland::{
compositor::with_states, compositor::with_states,
seat::{AxisFrame, GrabStartData, PointerGrab, PointerInnerHandle}, seat::{AxisFrame, PointerGrab, PointerGrabStartData, PointerInnerHandle},
shell::xdg::{SurfaceCachedState, ToplevelConfigure, XdgToplevelSurfaceRoleAttributes}, shell::xdg::{SurfaceCachedState, ToplevelConfigure, XdgToplevelSurfaceRoleAttributes},
Serial, Serial,
}, },
@ -22,7 +22,7 @@ struct MoveData {
} }
pub struct MoveSurfaceGrab { pub struct MoveSurfaceGrab {
start_data: GrabStartData, start_data: PointerGrabStartData,
window: Window, window: Window,
initial_window_location: Point<i32, Logical>, initial_window_location: Point<i32, Logical>,
} }
@ -70,14 +70,14 @@ impl PointerGrab for MoveSurfaceGrab {
handle.axis(details) handle.axis(details)
} }
fn start_data(&self) -> &GrabStartData { fn start_data(&self) -> &PointerGrabStartData {
&self.start_data &self.start_data
} }
} }
impl MoveSurfaceGrab { impl MoveSurfaceGrab {
pub fn new( pub fn new(
start_data: GrabStartData, start_data: PointerGrabStartData,
window: Window, window: Window,
initial_window_location: Point<i32, Logical>, initial_window_location: Point<i32, Logical>,
) -> MoveSurfaceGrab { ) -> MoveSurfaceGrab {
@ -159,7 +159,7 @@ impl Default for ResizeState {
} }
pub struct ResizeSurfaceGrab { pub struct ResizeSurfaceGrab {
start_data: GrabStartData, start_data: PointerGrabStartData,
window: Window, window: Window,
edges: ResizeEdge, edges: ResizeEdge,
initial_window_size: Size<i32, Logical>, initial_window_size: Size<i32, Logical>,
@ -290,14 +290,14 @@ impl PointerGrab for ResizeSurfaceGrab {
handle.axis(details) handle.axis(details)
} }
fn start_data(&self) -> &GrabStartData { fn start_data(&self) -> &PointerGrabStartData {
&self.start_data &self.start_data
} }
} }
impl ResizeSurfaceGrab { impl ResizeSurfaceGrab {
pub fn new( pub fn new(
start_data: GrabStartData, start_data: PointerGrabStartData,
window: Window, window: Window,
edges: xdg_toplevel::ResizeEdge, edges: xdg_toplevel::ResizeEdge,
initial_window_geometry: Rectangle<i32, Logical>, initial_window_geometry: Rectangle<i32, Logical>,

View file

@ -11,7 +11,7 @@ use smithay::{
wayland::{ wayland::{
compositor::{compositor_init, with_states}, compositor::{compositor_init, with_states},
output::Output, output::Output,
seat::{GrabStartData, PointerHandle, Seat}, seat::{PointerGrabStartData, PointerHandle, Seat},
shell::{ shell::{
wlr_layer::{ wlr_layer::{
wlr_layer_shell_init, LayerShellRequest, LayerShellState, LayerSurfaceAttributes, wlr_layer_shell_init, LayerShellRequest, LayerShellState, LayerSurfaceAttributes,
@ -262,7 +262,7 @@ fn check_grab_preconditions(
seat: &Seat, seat: &Seat,
surface: Option<&WlSurface>, surface: Option<&WlSurface>,
serial: Serial, serial: Serial,
) -> Option<(PointerHandle, GrabStartData)> { ) -> Option<(PointerHandle, PointerGrabStartData)> {
let surface = if let Some(surface) = surface { let surface = if let Some(surface) = surface {
surface surface
} else { } else {