shell: Allow querying current vs pending state
This commit is contained in:
parent
8f20cf5ece
commit
be1b4ceb10
8 changed files with 111 additions and 69 deletions
|
|
@ -226,7 +226,7 @@ impl ResizeSurfaceGrab {
|
|||
|
||||
// Finish resizing.
|
||||
if let Some(ResizeState::WaitingForCommit(_)) = *resize_state {
|
||||
if !window.is_resizing().unwrap_or(false) {
|
||||
if !window.is_resizing(false).unwrap_or(false) {
|
||||
*resize_state = None;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ impl FloatingLayout {
|
|||
|
||||
pub fn unmap(&mut self, window: &CosmicMapped) -> bool {
|
||||
#[allow(irrefutable_let_patterns)]
|
||||
let is_maximized = window.is_maximized();
|
||||
let is_maximized = window.is_maximized(true);
|
||||
|
||||
if !is_maximized {
|
||||
if let Some(location) = self.space.element_location(window) {
|
||||
|
|
|
|||
|
|
@ -1415,7 +1415,7 @@ impl TilingLayout {
|
|||
}
|
||||
},
|
||||
Data::Mapped { mapped, .. } => {
|
||||
if !(mapped.is_fullscreen() || mapped.is_maximized()) {
|
||||
if !(mapped.is_fullscreen(true) || mapped.is_maximized(true)) {
|
||||
mapped.set_tiled(true);
|
||||
let internal_geometry = Rectangle::from_loc_and_size(
|
||||
geo.loc + output.geometry().loc,
|
||||
|
|
@ -1460,7 +1460,7 @@ impl TilingLayout {
|
|||
.unwrap()
|
||||
.filter(|node| node.data().is_mapped(None))
|
||||
.filter(|node| match node.data() {
|
||||
Data::Mapped { mapped, .. } => mapped.is_activated(),
|
||||
Data::Mapped { mapped, .. } => mapped.is_activated(false),
|
||||
_ => unreachable!(),
|
||||
})
|
||||
.map(|node| match node.data() {
|
||||
|
|
@ -1480,7 +1480,7 @@ impl TilingLayout {
|
|||
.unwrap()
|
||||
.filter(|node| node.data().is_mapped(None))
|
||||
.filter(|node| match node.data() {
|
||||
Data::Mapped { mapped, .. } => !mapped.is_activated(),
|
||||
Data::Mapped { mapped, .. } => !mapped.is_activated(false),
|
||||
_ => unreachable!(),
|
||||
})
|
||||
.map(|node| match node.data() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue