baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.61k stars 420 forks source link

Swapping a focused node with a receptacle will transfer focus to the receptacle #1469

Open ortango opened 9 months ago

ortango commented 9 months ago

Swapping a focused node with a receptacle on another desktop will transfer desktop focus to the receptacle.

Checking IS_RECEPTACLE and setting focus to NULL seems to fix the issue.

ortango commented 7 months ago

adding a small example:

#window is focused on ^1
$ bspc query -N -n focused.window
0x01200027
#create receptacle on ^2
$ bspc node @^2:/ -i
$ bspc query -N -d ^2 -n .leaf
0x01400013
$ bspc node -s  0x01400013
#check focusedNodeId of desktop ^1
$ printf '0x%X\n' $(bspc wm -d | jq '.monitors[0].desktops[0].focusedNodeId')
0x01400013
#is the receptacle.