swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.57k stars 1.11k forks source link

Unnecessarily nesting tabs when opening programs #5930

Open ChrisLane opened 3 years ago

ChrisLane commented 3 years ago

Sway Version:

Description:

Example:

Additional Info:

rpigott commented 3 years ago

This is a behavior that's appeared within the last few weeks.

Probably #5756

I tried opening discord on an empty workspace with layout tabbed set, but it seems to work fine? I installed Telegram as well and tried opening them both at once but they tab as expected. Can you describe the expected/actual behavior? Could you give the expected/actual workspace representation as reported by swaymsg -t get_workspaces? Are you using workspace_layout in your config or setting the workspace layout by focusing the workspace and running the layout tabbed command?

ChrisLane commented 3 years ago

Could you give the expected/actual workspace representation as reported by swaymsg -t get_workspaces? Workspace output for most basic case (two programs):

Workspace  (off-screen)
Output: HDMI-A-1
Layout: splith
Representation: H[T[T[telegramdesktop] discord]]

I expect the representation to be H[T[telegramdesktop discord]] Are you using workspace_layout in your config or setting the workspace layout by focusing the workspace and running the layout tabbed command?

I'm not using either, I set the tabbed layout for a particular workspace in the config for_window [workspace=] layout tabbed Minimal config I used to reproduce this: https://gist.github.com/ChrisLane/0c949fa762a46720404f6d2643ec177d

rpigott commented 3 years ago

for_window [workspace=] layout tabbed

Ooh, I bet this is why. I don't think we are careful enough in view_map to avoid applying criteria where they don't apply w/ regard to "wants_floating" windows, which would explain why it only happens to "splash screen" clients. I previously didn't know of any bugs it caused so left it alone.

quick steps to reproduce:

  1. for_window [workspace=test] layout tabbed
  2. open a window on workspace test
  3. open a "splash window" on workspace test
  4. An additional T split appears in the tiling layer

Better description/debug log later.

ChrisLane commented 3 years ago

@RPigott does this still need an improved description/log or are these comments enough?

rpigott commented 3 years ago

I think these comments are probably enough. A succinct and reliable "steps to reproduce" is usually the most important, and it looks like we've got that. I was just busy at the time and never ended up looking into it further.