Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/actor/reactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1524,14 +1524,19 @@ impl Reactor {
frame: &CGRect,
window_server_id: Option<WindowServerId>,
) -> Option<SpaceId> {
if let Some(space) = window_server_id.and_then(crate::sys::window_server::window_space)
&& (self.space_manager.screen_by_space(space).is_some()
|| crate::sys::window_server::space_is_user(space.get()))
{
if let Some(space) = self.best_space_for_frame(frame) {
return Some(space);
}

self.best_space_for_frame(frame)
if let Some(space) = window_server_id.and_then(crate::sys::window_server::window_space) {
if self.space_manager.screen_by_space(space).is_some()
|| crate::sys::window_server::space_is_user(space.get())
{
return Some(space);
}
}

None
}

fn best_space_for_frame(&self, frame: &CGRect) -> Option<SpaceId> {
Expand Down
20 changes: 19 additions & 1 deletion src/actor/reactor/animation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,16 @@ impl AnimationManager {
if target_frame.same_as(current_frame) {
continue;
}
any_frame_changed = true;
let wsid = window.info.sys_id.unwrap();
if reactor
.transaction_manager
.get_target_frame(wsid)
.is_some_and(|pending| pending.same_as(target_frame))
{
trace!(?wid, ?target_frame, "Skipping redundant layout request");
continue;
}
any_frame_changed = true;
let txid = reactor.transaction_manager.generate_next_txid(wsid);
(current_frame, Some(wsid), txid)
Comment thread
acsandmann marked this conversation as resolved.
}
Expand Down Expand Up @@ -278,6 +286,16 @@ impl AnimationManager {
if target_frame.same_as(current_frame) {
continue;
}
if let Some(wsid) = window.info.sys_id {
if reactor
.transaction_manager
.get_target_frame(wsid)
.is_some_and(|pending| pending.same_as(target_frame))
{
trace!(?wid, ?target_frame, "Skipping redundant instant layout request");
continue;
}
}
any_frame_changed = true;
trace!(
?wid,
Expand Down
Loading