xmonad / xmonad-contrib

Contributed modules for xmonad
https://xmonad.org
BSD 3-Clause "New" or "Revised" License
586 stars 274 forks source link

simpleTabbed jumps to first tab when moving floating window #313

Open anka-213 opened 5 years ago

anka-213 commented 5 years ago

Problem Description

When using tabbed layout with simpleTabbed, the focus will jump to the first tab when moving a floating window. The same problem does not appear with the Full layout.

Steps to reproduce:

Configuration File

Please include the smallest configuration file that reproduces the problem you are experiencing:

module Main (main) where

import XMonad
import XMonad.Layout.Tabbed

main :: IO ()
main = xmonad $ def
  { layoutHook = simpleTabbed
  }

Checklist

geekosaur commented 5 years ago

Floating windows are not going to behave sanely regardless of layout. The behavior difference here is because the tabs themselves are part of the StackSet, although neither they nor the floating window are controlled directly by the layout (which is ultimately the source of the problem).

Fixing this requires refiguring most of xmonad's guts and working out how floats and other special windows (such as aforementioned tabs) should work, and will be backwards incompatible as it will almost certainly need to move floating windows into the layout which currently only deals with tabbed windows.

anka-213 commented 5 years ago

@geekosaur Aha, that's disappointing. So I assume there is no simple workaround I can do either?

Thanks for the quick answer!

geekosaur commented 5 years ago

There are various modules that try to track floating windows better, but I suspect none of them handles how Tabbed hides its tabs in the StackSet because they're neither in the floating window map nor in the layout. And Tabbed relies on the StackSet to update the tabs' borders for it to indicate focus, so we can't simply pull them back out.

This was one of the oldest bugs in the old bug tracker; it's been frustrating for years, since it looks like a complete redesign is needed to fix it properly.

anka-213 commented 5 years ago

Should I close this as a duplicate of that issue then?

geekosaur commented 5 years ago

I'm not even seeing the issue in our current tracker offhand; we may have given up on it.

mikenrafter commented 3 years ago

I know it's been 2 years since this was last discussed, but others may find this useful.
But, there's a semi-solution that can be found in this module: XMonad.Layout.TrackFloating

I've been experiencing the occasional bug with this solution, but, overall, it works. And, the experience is certainly better with, than without it!

tim-kilian commented 2 years ago

Hej. TrackFloating did not worked for me. Is there an update on this?