nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
7.43k stars 119 forks source link

Brave browser tab becomes a floating window when pulled out #340

Open 27medkamal opened 3 months ago

27medkamal commented 3 months ago

First of all, want to say thanks for this great window manager. Much better than the alternatives.

Issue

When I have a Brave browser window with multiple tabs, if I use the mouse to click on a tab and pull it out of the current window, 2 things can happen:

  1. If I do it quickly and let go of the mouse as soon as the tab is out of the current window, it works fine and joins the current layout.
  2. If I delay it by anything around a second or more, it ends up as a floating window, then I have to join it into the current layout with layout floating tiling

Correction: had this issue reported for Chrome, but the issue doesn't happen in chrome. Seems isolated to Brave. Edited the above to reflect the actual issue.

jakenvac commented 3 months ago

I'm also experiencing this with Brave. I think the app id for brave (com.brave.Browser) just needs to be added here: https://github.com/nikitabobko/AeroSpace/blob/9faadae61776a5ae352a334ee257365b81dbdaa5/Sources/AppBundle/tree/MacWindow.swift#L239-L253

I'm unable to build and test it myself at the moment but I'll see if I can get some time later on and submit a PR.

nikitabobko commented 3 months ago

@jakenvac you are technically correct. We can just add Brave in the list here (similar to Chrome) and AeroSpace will force tile all Brave windows by default

I'm a little bit hesitant to do so because the solution for Chrome is not perfect:

Unless Brave uses dialogs in their UI that will mistakenly get tiled (Chrome doesn't use dialogs at all), I'm ok with adding Brave to the list

nikitabobko commented 3 months ago

Right now, there is a workaround:

[[on-window-detected]]
if.app-id = 'com.brave.Browser'
run = 'layout tiling'
jakenvac commented 3 months ago

As far as I can tell, brave seems to behave exactly the same as chrome with all of it's windowing behaviour. However your workaround is good enough for me - I'm personally not a fan of hardcoding lots of specific rules if it can be avoided 😄. Thanks!

27medkamal commented 3 months ago

I agree. I think Brave has the exact same window behaviour as Chrome. I believe it should be safe to add it.

Workaround works as well, so thanks for that.

stevo-knievo commented 1 month ago

I have the same issue. But the workaround works well. Thank you!

AeroSpace v0.14.2-Beta 0cb8dbdfc5ee73b8cbc200f175f467ebead55201

PS: @nikitabobko I just found out about AeroSpace. I'm my opinion best tiling window manager for macOS by far!! Thank you so so much! Time to learn Swift to contribute to the awesome project as well. Thanks again!