autosplit misfires

This commit is contained in:
Alex Janka 2024-09-24 15:14:43 +10:00
parent 5e2ffa096c
commit 18814338da
4 changed files with 7 additions and 4 deletions

2
Cargo.lock generated
View file

@ -1041,7 +1041,7 @@ dependencies = [
[[package]]
name = "sway-flash-indicator"
version = "0.6.0"
version = "0.6.1"
dependencies = [
"directories",
"futures-util",

View file

@ -1,6 +1,6 @@
[package]
name = "sway-flash-indicator"
version = "0.6.0"
version = "0.6.1"
edition = "2021"
[dependencies]

View file

@ -1,7 +1,7 @@
# Maintainer: Alex Janka <alex@alexjanka.com>
pkgname=sway-flash-indicator
pkgver=0.6.0
pkgver=0.6.1
pkgrel=1
pkgdesc="flashes sway indicator border rather than always showing it"
arch=('x86_64' 'aarch64')

View file

@ -122,7 +122,10 @@ async fn main() -> Res<()> {
// TODO: also change on window closed -
// the node we're given is the one that closes
if window.change != swayipc_async::WindowChange::Close {
if window.change == swayipc_async::WindowChange::Focus
&& node.focused
&& tree.find_as_ref(|n| n.id == node.id).is_some()
{
autosplit(&node, &tree, &mut command_connection).await?;
}
}