toplevel_info: Don't send geometry updates, while resizing
This commit is contained in:
parent
75661c6ca7
commit
39528878f8
2 changed files with 13 additions and 6 deletions
|
|
@ -48,7 +48,11 @@ impl Window for CosmicSurface {
|
|||
}
|
||||
|
||||
fn is_sticky(&self) -> bool {
|
||||
CosmicSurface::is_sticky(&self)
|
||||
CosmicSurface::is_sticky(self)
|
||||
}
|
||||
|
||||
fn is_resizing(&self) -> bool {
|
||||
CosmicSurface::is_resizing(self, true).unwrap_or(false)
|
||||
}
|
||||
|
||||
fn global_geometry(&self) -> Option<Rectangle<i32, Global>> {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ pub trait Window: IsAlive + Clone + PartialEq + Send {
|
|||
fn is_fullscreen(&self) -> bool;
|
||||
fn is_minimized(&self) -> bool;
|
||||
fn is_sticky(&self) -> bool;
|
||||
fn is_resizing(&self) -> bool;
|
||||
fn global_geometry(&self) -> Option<Rectangle<i32, Global>>;
|
||||
fn user_data(&self) -> &UserDataMap;
|
||||
}
|
||||
|
|
@ -536,12 +537,14 @@ where
|
|||
changed = true;
|
||||
}
|
||||
|
||||
let geometry = window.global_geometry();
|
||||
let mut geometry_changed = false;
|
||||
if handle_state.geometry != geometry {
|
||||
handle_state.geometry = geometry;
|
||||
changed = true;
|
||||
geometry_changed = true;
|
||||
if !window.is_resizing() {
|
||||
let geometry = window.global_geometry();
|
||||
if handle_state.geometry != geometry {
|
||||
handle_state.geometry = geometry;
|
||||
changed = true;
|
||||
geometry_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if let Ok(client) = dh.get_client(instance.id()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue