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

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

Closed
27medkamal opened this issue Jul 29, 2024 · 7 comments
Closed

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

27medkamal opened this issue Jul 29, 2024 · 7 comments

Comments

@27medkamal
Copy link

27medkamal commented Jul 29, 2024

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.

@27medkamal 27medkamal changed the title Chrome tab becomes a floating window when pulled out. Chrome tab becomes a floating window when pulled out Jul 29, 2024
@27medkamal 27medkamal changed the title Chrome tab becomes a floating window when pulled out Brave browser tab becomes a floating window when pulled out Jul 29, 2024
@jakenvac
Copy link
Contributor

I'm also experiencing this with Brave. I think the app id for brave (com.brave.Browser) just needs to be added here:

if !isFullscreenable(axWindow) &&
app.id != "com.google.Chrome" && // "Drag out" a tab out of Chrome window
app.id != "org.gimp.gimp-2.10" && // Gimp doesn't show fullscreen button
app.id != "com.apple.ActivityMonitor" && // Activity Monitor doesn't show fullscreen button
// Terminal apps and Emacs have an option to hide their title bars
app.id != "org.alacritty" &&
app.id != "net.kovidgoyal.kitty" && // ~/.config/kitty/kitty.conf: hide_window_decorations titlebar-and-corners
app.id != "com.mitchellh.ghostty" && // ~/.config/ghostty/config: window-decoration = false
app.id != "com.github.wez.wezterm" &&
app.id != "com.googlecode.iterm2" &&
app.id != "org.gnu.Emacs" {
return true
}
return false

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

nikitabobko commented Aug 15, 2024

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

Right now, there is a workaround:

[[on-window-detected]]
if.app-id = 'com.brave.Browser'
run = 'layout tiling'

@jakenvac
Copy link
Contributor

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

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

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

AeroSpace v0.14.2-Beta 0cb8dbd

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!

@nikitabobko
Copy link
Owner

Closing in favor of #1001

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