mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-14 08:01:14 +01:00
Remove obsolete function
This commit is contained in:
parent
e529f09ec9
commit
7dabc4d22c
3 changed files with 12 additions and 38 deletions
|
@ -5,7 +5,7 @@ use smithay::{
|
|||
desktop::layer_map_for_output,
|
||||
output::Output,
|
||||
reexports::wayland_server::Resource,
|
||||
utils::{Logical, Point, Rectangle, Size},
|
||||
utils::{IsAlive, Logical, Point, Rectangle, Size},
|
||||
wayland::compositor::{self, CompositorHandler},
|
||||
};
|
||||
|
||||
|
@ -199,9 +199,12 @@ impl State {
|
|||
// schedule on all idle
|
||||
data.state.schedule(
|
||||
move |_dt| {
|
||||
pending_wins.iter().all(|(_, win)| {
|
||||
win.with_state(|state| state.loc_request_state.is_idle())
|
||||
})
|
||||
pending_wins
|
||||
.iter()
|
||||
.filter(|(_, win)| win.alive())
|
||||
.all(|(_, win)| {
|
||||
win.with_state(|state| state.loc_request_state.is_idle())
|
||||
})
|
||||
},
|
||||
move |dt| {
|
||||
for (loc, win) in non_pending_wins {
|
||||
|
|
|
@ -4,6 +4,7 @@ use async_process::Stdio;
|
|||
use futures_lite::AsyncBufReadExt;
|
||||
use smithay::{
|
||||
desktop::space::SpaceElement,
|
||||
utils::Rectangle,
|
||||
wayland::{compositor, shell::xdg::XdgToplevelSurfaceData},
|
||||
};
|
||||
|
||||
|
@ -68,7 +69,10 @@ impl State {
|
|||
if let Some(height) = height {
|
||||
window_size.h = height;
|
||||
}
|
||||
window.request_size_change(&mut self.space, window_loc, window_size);
|
||||
window.change_geometry(Rectangle::from_loc_and_size(window_loc, window_size));
|
||||
if let Some(output) = window.output(self) {
|
||||
self.update_windows(&output);
|
||||
}
|
||||
}
|
||||
Msg::MoveWindowToTag { window_id, tag_id } => {
|
||||
let Some(window) = window_id.window(self) else { return };
|
||||
|
|
|
@ -203,39 +203,6 @@ impl WindowElement {
|
|||
});
|
||||
}
|
||||
|
||||
/// Request a size and loc change.
|
||||
pub fn request_size_change(
|
||||
&self,
|
||||
space: &mut Space<WindowElement>,
|
||||
new_loc: Point<i32, Logical>,
|
||||
new_size: Size<i32, Logical>,
|
||||
) {
|
||||
match self {
|
||||
WindowElement::Wayland(window) => {
|
||||
window.toplevel().with_pending_state(|state| {
|
||||
state.size = Some(new_size);
|
||||
});
|
||||
self.with_state(|state| {
|
||||
state.loc_request_state =
|
||||
LocationRequestState::Requested(window.toplevel().send_configure(), new_loc)
|
||||
});
|
||||
}
|
||||
WindowElement::X11(surface) => {
|
||||
tracing::debug!("sending size change to x11 win");
|
||||
surface
|
||||
.configure(Rectangle::from_loc_and_size(new_loc, new_size))
|
||||
.expect("failed to configure x11 win");
|
||||
|
||||
if !surface.is_override_redirect() {
|
||||
surface
|
||||
.set_mapped(true)
|
||||
.expect("failed to set x11 win to mapped");
|
||||
}
|
||||
space.map_element(self.clone(), new_loc, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn class(&self) -> Option<String> {
|
||||
match self {
|
||||
WindowElement::Wayland(window) => {
|
||||
|
|
Loading…
Reference in a new issue