Skip to content

presel_dir on a hidden node is no-op #1530

Description

@samaingw

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:

        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:

bspwm/src/messages.c

Lines 365 to 368 in af3bd8b

if (trg.node == NULL || trg.node->vacant) {
fail(rsp, "");
break;
}

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 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions