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

floating vs floating should restack when moving focus. #1206

Open
barkyq opened this issue Jan 3, 2024 · 7 comments · May be fixed by #1211
Open

floating vs floating should restack when moving focus. #1206

barkyq opened this issue Jan 3, 2024 · 7 comments · May be fixed by #1211

Comments

@barkyq
Copy link
Contributor

barkyq commented Jan 3, 2024

floating vs floating should indeed restack when moving focus.

When changing focus (say with modifier+k or modifier+j) between floating windows, they do not restack, which seems counter-intuitive to me

cf post by @VuiMuich in #1094 (comment)

@barkyq
Copy link
Contributor Author

barkyq commented Jan 3, 2024

Also not just for floating windows, also for other (user created) layouts.

It seems the names "Monocle" and "MainAndDeck" are hardcoded into:

let monocle = layouts::MONOCLE;

It would be nice if this "restacking" could be done for floating windows, and for other templates.

@barkyq
Copy link
Contributor Author

barkyq commented Jan 8, 2024

#1211 adds some restacking functionality for floating windows.

Perhaps this should be user customizable. Right now, whenever a window takes focus it is moved to the top. Including windows in the layout. I find this is the most natural, as a I like to sometimes have floating windows underneath my main windows.

Note that the other part of restacking windows in a Monocle or MainAndDeck layout does not happen automatically and still relies on the custom handling in the "handlers" part of leftwm-core.

@barkyq barkyq changed the title floating vs floating should indeed restack when moving focus. floating vs floating should restack when moving focus. Jan 8, 2024
@Eskaan
Copy link
Contributor

Eskaan commented Jan 8, 2024

I don't think the current pr is a solution, because you can move floating windows behind tiled ones (and there is no easy way to get them back).

Could you explain why you want floating windows behind your tiled ones?

@barkyq
Copy link
Contributor Author

barkyq commented Jan 8, 2024

There is a way to get them back, using FocusWindowUp or FocusWindowDown

For example, one could have a floating terminal window spawned on top of a main text editor window. Then by using FocusWindowUp I can make it so the text editor is visible (the terminal window is now below it, or partially obscured, depending on their relative position). By running FocusWindowUp again I can bring the terminal window back into focus.

@Eskaan
Copy link
Contributor

Eskaan commented Jan 8, 2024

If you're interested in this behavior I would recommend adding a config option for that.

Edit: I think you would basically have to partially disable automatic window sorting.

@VuiMuich @mautamu how do you feel about this suggestion?

@barkyq
Copy link
Contributor Author

barkyq commented Jan 8, 2024

As far as I can tell, with this PR it behaves as I wanted it to, similarly to how DWM handles changes of focus with floating windows.

Edit: I see now that perhaps the focus manager also needs to "know" about this change, otherwise it is only temporary.

@barkyq
Copy link
Contributor Author

barkyq commented Jan 9, 2024

output.mp4

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

Successfully merging a pull request may close this issue.

2 participants