Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simpleTabbed jumps to first tab when moving floating window #313

Open
2 tasks done
anka-213 opened this issue Sep 18, 2019 · 7 comments
Open
2 tasks done

simpleTabbed jumps to first tab when moving floating window #313

anka-213 opened this issue Sep 18, 2019 · 7 comments

Comments

@anka-213
Copy link

anka-213 commented Sep 18, 2019

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

  • I've read CONTRIBUTING.md

  • 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 anka-213 changed the title simpleTabbed jumps to first window when moving floating window simpleTabbed jumps to first tab when moving floating window Sep 18, 2019
@geekosaur
Copy link
Contributor

geekosaur commented Sep 18, 2019

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
Copy link
Author

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

Thanks for the quick answer!

@geekosaur
Copy link
Contributor

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
Copy link
Author

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

@geekosaur
Copy link
Contributor

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

@mikenrafter
Copy link
Contributor

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
Copy link

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

magnickolas added a commit to magnickolas/dotfiles that referenced this issue Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants