xmonad-contrib icon indicating copy to clipboard operation
xmonad-contrib copied to clipboard

simpleTabbed jumps to first tab when moving floating window

Open anka-213 opened this issue 6 years ago • 7 comments

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:

  • Have at least two windows (tabs) open in tabbed layout
  • While the second tab is in focus, open a floating window (for example the open dialog)
  • Try to move the floating window.
  • The focus behind the floating window will now jump to the first tab.

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

  • [x] I've read CONTRIBUTING.md

  • [x] I have not tested my configuration with xmonad-testing No, I don't think it is relevant. I can do if you think it is.

anka-213 avatar Sep 18 '19 17:09 anka-213

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.

geekosaur avatar Sep 18 '19 17:09 geekosaur

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

Thanks for the quick answer!

anka-213 avatar Sep 18 '19 17:09 anka-213

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.

geekosaur avatar Sep 18 '19 17:09 geekosaur

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

anka-213 avatar Sep 18 '19 17:09 anka-213

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

geekosaur avatar Sep 18 '19 18:09 geekosaur

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!

mikenrafter avatar Oct 06 '21 19:10 mikenrafter

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

tim-kilian avatar Feb 04 '22 19:02 tim-kilian