deps: Update for smithay
This commit is contained in:
parent
219e21d573
commit
7de8d6e979
4 changed files with 19 additions and 19 deletions
|
|
@ -5,7 +5,7 @@ use smithay::{
|
|||
backend::renderer::utils::on_commit_buffer_handler,
|
||||
desktop::{
|
||||
layer_map_for_output, Kind, LayerSurface, PopupGrab, PopupKeyboardGrab, PopupKind,
|
||||
PopupPointerGrab, PopupUngrabStrategy, Window,
|
||||
PopupPointerGrab, PopupUngrabStrategy, Window, WindowSurfaceType,
|
||||
},
|
||||
reexports::{
|
||||
wayland_protocols::xdg_shell::server::xdg_toplevel,
|
||||
|
|
@ -101,7 +101,7 @@ pub fn init_shell(config: &Config, display: &mut Display) -> super::Shell {
|
|||
.unwrap();
|
||||
let window = workspace
|
||||
.space
|
||||
.window_for_surface(surface.get_surface().unwrap())
|
||||
.window_for_surface(surface.get_surface().unwrap(), WindowSurfaceType::TOPLEVEL)
|
||||
.unwrap()
|
||||
.clone();
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ pub fn init_shell(config: &Config, display: &mut Display) -> super::Shell {
|
|||
.unwrap();
|
||||
let window = workspace
|
||||
.space
|
||||
.window_for_surface(surface.get_surface().unwrap())
|
||||
.window_for_surface(surface.get_surface().unwrap(), WindowSurfaceType::TOPLEVEL)
|
||||
.unwrap()
|
||||
.clone();
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ pub fn init_shell(config: &Config, display: &mut Display) -> super::Shell {
|
|||
if let Some(window) = state
|
||||
.shell
|
||||
.space_for_surface(&surface)
|
||||
.and_then(|workspace| workspace.space.window_for_surface(&surface))
|
||||
.and_then(|workspace| workspace.space.window_for_surface(&surface, WindowSurfaceType::TOPLEVEL))
|
||||
{
|
||||
crate::shell::layout::floating::ResizeSurfaceGrab::ack_configure(
|
||||
window, configure,
|
||||
|
|
@ -154,7 +154,7 @@ pub fn init_shell(config: &Config, display: &mut Display) -> super::Shell {
|
|||
|
||||
if let Some(workspace) = state.shell.space_for_surface_mut(surface) {
|
||||
let window =
|
||||
workspace.space.window_for_surface(surface).unwrap().clone();
|
||||
workspace.space.window_for_surface(surface, WindowSurfaceType::TOPLEVEL).unwrap().clone();
|
||||
workspace.maximize_request(&window, &output)
|
||||
}
|
||||
}
|
||||
|
|
@ -222,7 +222,7 @@ pub fn init_shell(config: &Config, display: &mut Display) -> super::Shell {
|
|||
if let Some(surface) = surface.get_surface() {
|
||||
if let Some(workspace) = state.shell.space_for_surface_mut(surface) {
|
||||
let window =
|
||||
workspace.space.window_for_surface(surface).unwrap().clone();
|
||||
workspace.space.window_for_surface(surface, WindowSurfaceType::TOPLEVEL).unwrap().clone();
|
||||
workspace.fullscreen_request(&window, &output)
|
||||
}
|
||||
}
|
||||
|
|
@ -231,7 +231,7 @@ pub fn init_shell(config: &Config, display: &mut Display) -> super::Shell {
|
|||
if let Some(surface) = surface.get_surface() {
|
||||
if let Some(workspace) = state.shell.space_for_surface_mut(surface) {
|
||||
let window =
|
||||
workspace.space.window_for_surface(surface).unwrap().clone();
|
||||
workspace.space.window_for_surface(surface, WindowSurfaceType::TOPLEVEL).unwrap().clone();
|
||||
workspace.unfullscreen_request(&window)
|
||||
}
|
||||
}
|
||||
|
|
@ -358,7 +358,7 @@ fn commit(surface: &WlSurface, state: &mut State) {
|
|||
.and_then(|workspace| {
|
||||
workspace
|
||||
.space
|
||||
.window_for_surface(surface)
|
||||
.window_for_surface(surface, WindowSurfaceType::TOPLEVEL)
|
||||
.cloned()
|
||||
.map(|window| (&mut workspace.space, window))
|
||||
})
|
||||
|
|
@ -398,10 +398,10 @@ fn commit(surface: &WlSurface, state: &mut State) {
|
|||
|
||||
if let Some(output) = state.shell.outputs().find(|o| {
|
||||
let map = layer_map_for_output(o);
|
||||
map.layer_for_surface(surface).is_some()
|
||||
map.layer_for_surface(surface, WindowSurfaceType::TOPLEVEL).is_some()
|
||||
}) {
|
||||
let mut map = layer_map_for_output(output);
|
||||
let layer = map.layer_for_surface(surface).unwrap();
|
||||
let layer = map.layer_for_surface(surface, WindowSurfaceType::TOPLEVEL).unwrap();
|
||||
|
||||
// send the initial configure if relevant
|
||||
let initial_configure_sent = with_states(surface, |states| {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use crate::{
|
|||
state::Common,
|
||||
};
|
||||
pub use smithay::{
|
||||
desktop::{layer_map_for_output, PopupGrab, PopupManager, PopupUngrabStrategy, Space, Window},
|
||||
desktop::{layer_map_for_output, PopupGrab, PopupManager, PopupUngrabStrategy, Space, Window, WindowSurfaceType},
|
||||
reexports::wayland_server::{protocol::wl_surface::WlSurface, Display},
|
||||
utils::{Logical, Point, Rectangle, Size},
|
||||
wayland::{
|
||||
|
|
@ -604,14 +604,14 @@ impl Shell {
|
|||
.pending_windows
|
||||
.iter()
|
||||
.any(|(w, _)| w.toplevel().get_surface() == Some(surface))
|
||||
|| workspace.space.window_for_surface(surface).is_some()
|
||||
|| workspace.space.window_for_surface(surface, WindowSurfaceType::ALL).is_some()
|
||||
})
|
||||
}
|
||||
|
||||
pub fn space_for_surface_mut(&mut self, surface: &WlSurface) -> Option<&mut Workspace> {
|
||||
self.spaces
|
||||
.iter_mut()
|
||||
.find(|workspace| workspace.space.window_for_surface(surface).is_some())
|
||||
.find(|workspace| workspace.space.window_for_surface(surface, WindowSurfaceType::ALL).is_some())
|
||||
}
|
||||
|
||||
pub fn refresh(&mut self) {
|
||||
|
|
@ -731,7 +731,7 @@ impl Shell {
|
|||
// update FocusStack and notify layouts about new focus (if any window)
|
||||
if let Some(surface) = surface {
|
||||
if let Some(workspace) = self.space_for_surface_mut(surface) {
|
||||
if let Some(window) = workspace.space.window_for_surface(surface) {
|
||||
if let Some(window) = workspace.space.window_for_surface(surface, WindowSurfaceType::ALL) {
|
||||
let mut focus_stack = workspace.focus_stack_mut(active_seat);
|
||||
if Some(window) != focus_stack.last().as_ref() {
|
||||
slog_scope::debug!("Focusing window: {:?}", window);
|
||||
|
|
@ -838,7 +838,7 @@ impl Common {
|
|||
}
|
||||
|
||||
let workspace = self.shell.active_space(&output);
|
||||
if let Some(window) = workspace.space.window_for_surface(&surface) {
|
||||
if let Some(window) = workspace.space.window_for_surface(&surface, WindowSurfaceType::ALL) {
|
||||
let focus_stack = workspace.focus_stack(&seat);
|
||||
if focus_stack.last().map(|w| &w != window).unwrap_or(true) {
|
||||
fixup = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue