aboutsummaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-10-10 10:28:55 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-10-10 10:28:55 +0300
commit58fc5f3b06242fc6d6d3e3339222ebba6a4aac59 (patch)
tree846dc046215178d9bf1c8b6f3bd4d51ddc316d98 /src/layout
parent7d4e99b76047155c5aaa8453ff590f8e1e6befd3 (diff)
downloadniri-58fc5f3b06242fc6d6d3e3339222ebba6a4aac59.tar.gz
niri-58fc5f3b06242fc6d6d3e3339222ebba6a4aac59.tar.bz2
niri-58fc5f3b06242fc6d6d3e3339222ebba6a4aac59.zip
layout: Replace move_window_to_output with move_to_output
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/mod.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index 58be1e1f..710ba848 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -2173,40 +2173,6 @@ impl<W: LayoutElement> Layout<W> {
}
}
- pub fn move_window_to_output(&mut self, window: &W::Id, output: &Output) {
- let mut width = None;
- let mut is_full_width = false;
-
- if let MonitorSet::Normal { monitors, .. } = &mut self.monitor_set {
- for mon in &*monitors {
- for ws in &mon.workspaces {
- for col in &ws.columns {
- if col.contains(window) {
- width = Some(col.width);
- is_full_width = col.is_full_width;
- break;
- }
- }
- }
- }
- }
-
- let Some(width) = width else { return };
-
- let window = self.remove_window(window, Transaction::new()).unwrap();
-
- if let MonitorSet::Normal { monitors, .. } = &mut self.monitor_set {
- let new_idx = monitors
- .iter()
- .position(|mon| &mon.output == output)
- .unwrap();
-
- let workspace_idx = monitors[new_idx].active_workspace_idx;
- // FIXME: activate only if it was already active and focused.
- self.add_window_by_idx(new_idx, workspace_idx, window, true, width, is_full_width);
- }
- }
-
pub fn move_workspace_to_output(&mut self, output: &Output) {
let MonitorSet::Normal {
monitors,