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]]
name = "smithay"
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 = [
"appendlist",
"bitflags",
@ -1204,8 +1204,9 @@ dependencies = [
[[package]]
name = "smithay-egui"
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 = [
"cgmath",
"egui",
"lazy_static",
"memoffset",

View file

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

View file

@ -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

View file

@ -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>,

View file

@ -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 {