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]] [[package]]
name = "sway-flash-indicator" name = "sway-flash-indicator"
version = "0.6.0" version = "0.6.1"
dependencies = [ dependencies = [
"directories", "directories",
"futures-util", "futures-util",

View file

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

View file

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

View file

@ -122,7 +122,10 @@ async fn main() -> Res<()> {
// TODO: also change on window closed - // TODO: also change on window closed -
// the node we're given is the one that closes // 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?; autosplit(&node, &tree, &mut command_connection).await?;
} }
} }