shell: rename space_for_{window -> surface}
This commit is contained in:
parent
4de316cbce
commit
8ecc1345a6
6 changed files with 14 additions and 14 deletions
|
|
@ -162,7 +162,7 @@ impl CompositorHandler for State {
|
|||
if let Some((space, window)) =
|
||||
self.common
|
||||
.shell
|
||||
.space_for_surface_mut(surface)
|
||||
.space_for_window_mut(surface)
|
||||
.and_then(|workspace| {
|
||||
workspace
|
||||
.space
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ impl XdgShellHandler for State {
|
|||
if let Some(window) =
|
||||
self.common
|
||||
.shell
|
||||
.space_for_surface(&surface)
|
||||
.space_for_window(&surface)
|
||||
.and_then(|workspace| {
|
||||
workspace
|
||||
.space
|
||||
|
|
@ -173,7 +173,7 @@ impl XdgShellHandler for State {
|
|||
let workspace = self
|
||||
.common
|
||||
.shell
|
||||
.space_for_surface_mut(surface.wl_surface())
|
||||
.space_for_window_mut(surface.wl_surface())
|
||||
.unwrap();
|
||||
let window = workspace
|
||||
.space
|
||||
|
|
@ -198,7 +198,7 @@ impl XdgShellHandler for State {
|
|||
let workspace = self
|
||||
.common
|
||||
.shell
|
||||
.space_for_surface_mut(surface.wl_surface())
|
||||
.space_for_window_mut(surface.wl_surface())
|
||||
.unwrap();
|
||||
let window = workspace
|
||||
.space
|
||||
|
|
@ -215,7 +215,7 @@ impl XdgShellHandler for State {
|
|||
let seat = &self.common.last_active_seat;
|
||||
let output = active_output(seat, &self.common);
|
||||
|
||||
if let Some(workspace) = self.common.shell.space_for_surface_mut(surface) {
|
||||
if let Some(workspace) = self.common.shell.space_for_window_mut(surface) {
|
||||
let window = workspace
|
||||
.space
|
||||
.window_for_surface(surface, WindowSurfaceType::TOPLEVEL)
|
||||
|
|
@ -228,7 +228,7 @@ impl XdgShellHandler for State {
|
|||
fn unmaximize_request(&mut self, _dh: &DisplayHandle, surface: ToplevelSurface) {
|
||||
let surface = surface.wl_surface();
|
||||
|
||||
if let Some(workspace) = self.common.shell.space_for_surface_mut(surface) {
|
||||
if let Some(workspace) = self.common.shell.space_for_window_mut(surface) {
|
||||
let window = workspace
|
||||
.space
|
||||
.window_for_surface(surface, WindowSurfaceType::TOPLEVEL)
|
||||
|
|
@ -253,7 +253,7 @@ impl XdgShellHandler for State {
|
|||
});
|
||||
|
||||
let surface = surface.wl_surface();
|
||||
if let Some(workspace) = self.common.shell.space_for_surface_mut(surface) {
|
||||
if let Some(workspace) = self.common.shell.space_for_window_mut(surface) {
|
||||
let window = workspace
|
||||
.space
|
||||
.window_for_surface(surface, WindowSurfaceType::TOPLEVEL)
|
||||
|
|
@ -265,7 +265,7 @@ impl XdgShellHandler for State {
|
|||
|
||||
fn unfullscreen_request(&mut self, _dh: &DisplayHandle, surface: ToplevelSurface) {
|
||||
let surface = surface.wl_surface();
|
||||
if let Some(workspace) = self.common.shell.space_for_surface_mut(surface) {
|
||||
if let Some(workspace) = self.common.shell.space_for_window_mut(surface) {
|
||||
let window = workspace
|
||||
.space
|
||||
.window_for_surface(surface, WindowSurfaceType::TOPLEVEL)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ use std::sync::Mutex;
|
|||
impl Shell {
|
||||
pub fn unconstrain_popup(&self, surface: &PopupSurface, positioner: &PositionerState) {
|
||||
if let Some(parent) = get_popup_toplevel(&surface) {
|
||||
if let Some(workspace) = self.space_for_surface(&parent) {
|
||||
if let Some(workspace) = self.space_for_window(&parent) {
|
||||
let window = workspace
|
||||
.space
|
||||
.window_for_surface(&parent, WindowSurfaceType::ALL)
|
||||
|
|
@ -44,7 +44,7 @@ impl Shell {
|
|||
}
|
||||
|
||||
pub fn update_reactive_popups(&self, window: &Window) {
|
||||
if let Some(workspace) = self.space_for_surface(window.toplevel().wl_surface()) {
|
||||
if let Some(workspace) = self.space_for_window(window.toplevel().wl_surface()) {
|
||||
update_reactive_popups(&workspace.space, window);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue