This PR makes it so when you toggle between workspace layers it moves all windows of that layer to the top. So if you move to Floating layer, then all floating windows are moved to the top, if you go back to Tiling layer all containers are moved to the top.
It also includes one important bug fix, which stops an infinite loop of focus events when you focus a floating window. This bug fix is better explained on the first commit message.
I wanted to make this PR a draft, but made it a normal PR and now I don't know how to change it to a draft... Scratch that I found the button 😅
I wanted to test this behaviour since to me it makes more sense. What I want is for when you toggle the layer all the windows for that layer show up on top. I've tried to use the WindowsApi::raise_window() function instead of the raise_and_focus_window() but that wasn't working (it was moving to top only the window with focus). Also there is currently an issue with the borders that don't update properly.
@LGUG2Z @CtByte When you guys have the chance try this out and tell me your thoughts about this behaviour, I myself like it and prefer it but others might not... Also if you can help out with the issue with the borders that would be great!
@LGUG2Z One last thing, that first commit with the bug fix on the FocusChange event should probably be cherry-picked into master though or if you prefer I can create a PR just for that...
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/LGUG2Z/komorebi/pull/1297
**Author:** [@alex-ds13](https://github.com/alex-ds13)
**Created:** 2/24/2025
**Status:** ❌ Closed
**Base:** `master` ← **Head:** `feature/toggle-layer-moves-all-windows`
---
### 📝 Commits (1)
- [`ee4bda4`](https://github.com/LGUG2Z/komorebi/commit/ee4bda436f985961a10c9df73259a913739ba1ff) feat(wm): toggle layer moves all windows
### 📊 Changes
**4 files changed** (+89 additions, -9 deletions)
<details>
<summary>View changed files</summary>
📝 `komorebi/src/border_manager/mod.rs` (+16 -2)
📝 `komorebi/src/process_command.rs` (+25 -4)
📝 `komorebi/src/window.rs` (+24 -0)
📝 `komorebi/src/windows_api.rs` (+24 -3)
</details>
### 📄 Description
This PR makes it so when you toggle between workspace layers it moves all windows of that layer to the top. So if you move to `Floating` layer, then all floating windows are moved to the top, if you go back to `Tiling` layer all containers are moved to the top.
It also includes one important bug fix, which stops an infinite loop of focus events when you focus a floating window. This bug fix is better explained on the first commit message.
~I wanted to make this PR a draft, but made it a normal PR and now I don't know how to change it to a draft...~ Scratch that I found the button 😅
I wanted to test this behaviour since to me it makes more sense. What I want is for when you toggle the layer all the windows for that layer show up on top. I've tried to use the `WindowsApi::raise_window()` function instead of the `raise_and_focus_window()` but that wasn't working (it was moving to top only the window with focus). Also there is currently an issue with the borders that don't update properly.
@LGUG2Z @CtByte When you guys have the chance try this out and tell me your thoughts about this behaviour, I myself like it and prefer it but others might not... Also if you can help out with the issue with the borders that would be great!
@LGUG2Z One last thing, that first commit with the bug fix on the `FocusChange` event should probably be cherry-picked into master though or if you prefer I can create a PR just for that...
<!--
Please follow the Conventional Commits specification.
If you need to update your PR with changes from `master`, please run `git rebase master`.
By opening this PR, you confirm that you have read and understood this project's `CONTRIBUTING.md`.
-->
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/1297
Author: @alex-ds13
Created: 2/24/2025
Status: ❌ Closed
Base:
master← Head:feature/toggle-layer-moves-all-windows📝 Commits (1)
ee4bda4feat(wm): toggle layer moves all windows📊 Changes
4 files changed (+89 additions, -9 deletions)
View changed files
📝
komorebi/src/border_manager/mod.rs(+16 -2)📝
komorebi/src/process_command.rs(+25 -4)📝
komorebi/src/window.rs(+24 -0)📝
komorebi/src/windows_api.rs(+24 -3)📄 Description
This PR makes it so when you toggle between workspace layers it moves all windows of that layer to the top. So if you move to
Floatinglayer, then all floating windows are moved to the top, if you go back toTilinglayer all containers are moved to the top.It also includes one important bug fix, which stops an infinite loop of focus events when you focus a floating window. This bug fix is better explained on the first commit message.
I wanted to make this PR a draft, but made it a normal PR and now I don't know how to change it to a draft...Scratch that I found the button 😅I wanted to test this behaviour since to me it makes more sense. What I want is for when you toggle the layer all the windows for that layer show up on top. I've tried to use the
WindowsApi::raise_window()function instead of theraise_and_focus_window()but that wasn't working (it was moving to top only the window with focus). Also there is currently an issue with the borders that don't update properly.@LGUG2Z @CtByte When you guys have the chance try this out and tell me your thoughts about this behaviour, I myself like it and prefer it but others might not... Also if you can help out with the issue with the borders that would be great!
@LGUG2Z One last thing, that first commit with the bug fix on the
FocusChangeevent should probably be cherry-picked into master though or if you prefer I can create a PR just for that...🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.