#1530·bspwm

presel_dir on a hidden node is no-op

Author: samaingwCreated Sep 1, 2025Updated Sep 2, 2025

Edit: after further investigation, the issue seems to be on presel_dir and not on transfer_node, text edited accordingly.

TL;DR: presel_dir on hidden node doesn't work because node is vacant. However one can transfer to a hidden window, so to me it makes sense to allow presel_dir on hidden nodes too.

AFAIK, this is not something that popped up in the issues (opened and closed), sorry if I'm duplicating !

Context

I come from dwm, and sometimes I lack its features, so I'm developping external tools that calls bspc to mimic dwm behaviour (or at least the subset I'm using) inside bspwm. And I launch them only when I miss them.

From dwm, I import tag management and dynamic main/remainder tiling layout. I'm happy with my tag management workflow, I'm currently working on the main/remainder tiling.

What I'm doing

To that end, I maintain a tree structure like this:

bash
        R
      /   \
     /     \
    /       \
   o         \
  / \         o
w1   o       / \
    /  \   w6   o
   w2   o      / \
       /  \   w7  w8
      w4   w5      [...]

@/1 is the root of my "main", @/2 of my "remainder". When a node in main gets hidden (say w2), I pull one from remainder. In that example I grab w6 and put it south of w5. However, if w6 is already hidden, I grab the first node that is visible, pulling everything until I reach that node. So if w6 is hidden but w7 is visible, I transfer w6 south of w5, and w7 south of w6.

The problem

  • I can transfer a visible node to a visible node
  • I can transfer a hidden node to a visible node
  • I cannot transfer a node to a hidden node using a preselected direction

It seems that presel_dir doesn't work on a hidden node.

I think my issue comes from this: https://github.com/baskerville/bspwm/blob/af3bd8b4351f4478fe0fe3cfd6c09e44cb108b4b/src/messages.c#L365-L368

The question

The vacant flag covers floating, hidden and fullscreen. I perfectly understand that trying to tile/transfer/presel_dir on fullscreen and floating windows makes no sense.

However, I think it makes sense to allow transfer/presel_dir on hidden nodes. Thoughts on that ?