diff --git a/Cargo.lock b/Cargo.lock index 2d9a09de..c5078324 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -663,7 +663,7 @@ checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" [[package]] name = "smithay" version = "0.3.0" -source = "git+https://github.com/Smithay/smithay.git?rev=a16c307#a16c307ed33c0daeec89d07ac795abaa8b4dfd81" +source = "git+https://github.com/Smithay/smithay.git?rev=820e67f#820e67f82c69c3524740cf8b85a5c1c3a59c32f7" dependencies = [ "appendlist", "bitflags", diff --git a/Cargo.toml b/Cargo.toml index 99b48a35..a3d4a5ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,6 @@ slog-stdlog = "4.1" [dependencies.smithay] version = "0.3" git = "https://github.com/Smithay/smithay.git" -rev = "a16c307" +rev = "820e67f" default-features = false features = ["backend_x11", "backend_egl", "desktop", "use_system_lib", "renderer_gl", "wayland_frontend"] \ No newline at end of file diff --git a/src/backend/x11.rs b/src/backend/x11.rs index 1a1fbfc1..2322d4c0 100644 --- a/src/backend/x11.rs +++ b/src/backend/x11.rs @@ -150,14 +150,14 @@ impl Surface { [0.153, 0.161, 0.165, 1.0], &[], ) { - Ok(true) => { + Ok(Some(_)) => { slog_scope::trace!("Finished rendering"); space.send_frames(false, start_time.elapsed().as_millis() as u32); self.surface .submit() .with_context(|| "Failed to submit buffer for display")?; } - Ok(false) => { + Ok(None) => { let _ = renderer.unbind(); self.render.ping(); } diff --git a/src/input/mod.rs b/src/input/mod.rs index 468d90a9..e30c941f 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -286,7 +286,8 @@ impl State { .or_else(|| layers.layer_under(WlrLayer::Top, pos)) { if layer.can_receive_keyboard_focus() { - let layer_loc = layers.layer_geometry(layer).loc; + let layer_loc = + layers.layer_geometry(layer).unwrap().loc; under = layer .surface_under(pos - layer_loc.to_f64()) .map(|(s, _)| s); @@ -297,13 +298,14 @@ impl State { under = window .surface_under(pos - window_loc.to_f64()) .map(|(s, _)| s); - space.raise_window(&window); + space.raise_window(&window, true); } else if let Some(layer) = layers .layer_under(WlrLayer::Bottom, pos) .or_else(|| layers.layer_under(WlrLayer::Background, pos)) { if layer.can_receive_keyboard_focus() { - let layer_loc = layers.layer_geometry(layer).loc; + let layer_loc = + layers.layer_geometry(layer).unwrap().loc; under = layer .surface_under(pos - layer_loc.to_f64()) .map(|(s, _)| s); @@ -402,7 +404,7 @@ impl State { .layer_under(WlrLayer::Overlay, pos) .or_else(|| layers.layer_under(WlrLayer::Top, pos)) { - let layer_loc = layers.layer_geometry(layer).loc; + let layer_loc = layers.layer_geometry(layer).unwrap().loc; layer .surface_under(pos - output_geo.loc.to_f64() - layer_loc.to_f64()) .map(|(s, loc)| (s, loc + layer_loc)) @@ -415,7 +417,7 @@ impl State { .layer_under(WlrLayer::Bottom, pos) .or_else(|| layers.layer_under(WlrLayer::Background, pos)) { - let layer_loc = layers.layer_geometry(layer).loc; + let layer_loc = layers.layer_geometry(layer).unwrap().loc; layer .surface_under(pos - output_geo.loc.to_f64() - layer_loc.to_f64()) .map(|(s, loc)| (s, loc + layer_loc)) @@ -431,7 +433,7 @@ pub fn handle_window_movement(surface: Option<&WlSurface>, space: &mut Space) { if let Some(new_position) = crate::shell::grabs::MoveSurfaceGrab::apply_move_state(&window) { - space.map_window(&window, new_position); + space.map_window(&window, new_position, true); } } } diff --git a/src/shell/mod.rs b/src/shell/mod.rs index a556e9b8..1f29575f 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -61,7 +61,7 @@ pub fn init_shell(display: &mut Display) -> ShellStates { let output = active_output(seat, &state); let space = state.spaces.active_space_mut(&output); let window = Window::new(Kind::Xdg(surface)); - space.map_window(&window, (0, 0)); + space.map_window(&window, (0, 0), true); // We will position the window after the first commit, when we know its size } XdgRequest::NewPopup { surface, .. } => { @@ -200,7 +200,7 @@ pub fn init_shell(display: &mut Display) -> ShellStates { let layers = layer_map_for_output(&output); let geometry = layers.non_exclusive_zone(); - space.map_window(&window, geometry.loc); + space.map_window(&window, geometry.loc, true); let ret = surface.with_pending_state(|state| { state.states.set(xdg_toplevel::State::Maximized); state.size = Some(geometry.size); @@ -336,7 +336,7 @@ fn commit(surface: &WlSurface, state: &mut State) { geometry.loc.x + (geometry.size.w / 2) - (win_geo.size.w / 2), geometry.loc.y + (geometry.size.h / 2) - (win_geo.size.h / 2), ); - space.map_window(&window, position); + space.map_window(&window, position, true); state.pending_toplevels.retain(|toplevel| { toplevel .get_surface() @@ -365,7 +365,7 @@ fn commit(surface: &WlSurface, state: &mut State) { space.window_geometry(&window).unwrap(), ); if let Some(location) = new_location { - space.map_window(&window, location); + space.map_window(&window, location, true); } return;