aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-02-23 17:40:30 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-02-23 17:40:30 +0400
commitdfbc0241274317e0a90b5ca86fd6b5f3cab2e2bf (patch)
treebef2d9b9577b1c816abcc2b9e4e7699787f7eff1 /src
parenteb2dce1b530584496034bc6d7f14e9b29a487faf (diff)
downloadniri-dfbc0241274317e0a90b5ca86fd6b5f3cab2e2bf.tar.gz
niri-dfbc0241274317e0a90b5ca86fd6b5f3cab2e2bf.tar.bz2
niri-dfbc0241274317e0a90b5ca86fd6b5f3cab2e2bf.zip
Rename surface -> toplevel
Diffstat (limited to 'src')
-rw-r--r--src/handlers/xdg_shell.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs
index 7ad43db8..155e893a 100644
--- a/src/handlers/xdg_shell.rs
+++ b/src/handlers/xdg_shell.rs
@@ -264,13 +264,13 @@ impl XdgShellHandler for State {
fn fullscreen_request(
&mut self,
- surface: ToplevelSurface,
+ toplevel: ToplevelSurface,
wl_output: Option<wl_output::WlOutput>,
) {
if let Some((window, current_output)) = self
.niri
.layout
- .find_window_and_output(surface.wl_surface())
+ .find_window_and_output(toplevel.wl_surface())
{
let window = window.clone();
@@ -286,8 +286,8 @@ impl XdgShellHandler for State {
// A configure is required in response to this event regardless if there are pending
// changes.
- surface.send_configure();
- } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(surface.wl_surface()) {
+ toplevel.send_configure();
+ } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) {
match &mut unmapped.state {
InitialConfigureState::NotConfigured { wants_fullscreen } => {
*wants_fullscreen = Some(wl_output.as_ref().and_then(Output::from_resource));
@@ -298,28 +298,28 @@ impl XdgShellHandler for State {
// FIXME: implement this once I figure out a good way without code duplication.
// We already sent the initial configure, so we need to reconfigure.
- surface.send_configure();
+ toplevel.send_configure();
}
}
} else {
error!("couldn't find the toplevel in fullscreen_request()");
- surface.send_configure();
+ toplevel.send_configure();
}
}
- fn unfullscreen_request(&mut self, surface: ToplevelSurface) {
+ fn unfullscreen_request(&mut self, toplevel: ToplevelSurface) {
if let Some((window, _)) = self
.niri
.layout
- .find_window_and_output(surface.wl_surface())
+ .find_window_and_output(toplevel.wl_surface())
{
let window = window.clone();
self.niri.layout.set_fullscreen(&window, false);
// A configure is required in response to this event regardless if there are pending
// changes.
- surface.send_configure();
- } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(surface.wl_surface()) {
+ toplevel.send_configure();
+ } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) {
match &mut unmapped.state {
InitialConfigureState::NotConfigured { wants_fullscreen } => {
*wants_fullscreen = None;
@@ -330,12 +330,12 @@ impl XdgShellHandler for State {
// FIXME: implement this once I figure out a good way without code duplication.
// We already sent the initial configure, so we need to reconfigure.
- surface.send_configure();
+ toplevel.send_configure();
}
}
} else {
error!("couldn't find the toplevel in unfullscreen_request()");
- surface.send_configure();
+ toplevel.send_configure();
}
}