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

Native macOS terminal tabs breaks window layouts #1613

Open
joelklint opened this issue Mar 7, 2024 · 8 comments
Open

Native macOS terminal tabs breaks window layouts #1613

joelklint opened this issue Mar 7, 2024 · 8 comments
Labels

Comments

@joelklint
Copy link

Describe the bug
Altering the count of tabs in native macOS terminal makes amethyst stop including the terminal window in layout calculations.

Applications:
macOS native terminal (com.apple.Terminal)

To Reproduce

  1. Use Tall layout with no open windows
  2. Open Safari
  3. Open Dictionary
  4. Open Terminal
  5. Ensure Terminal is in the bottom right of layout. If it is not, then move it there. You should now have three tiled windows with Terminal in the bottom right.
  6. Focus Terminal
  7. Click Cmd+T to open a new tab in Terminal
  8. Click Cmd+W to close the new tab in Terminal

Expected behavior
The window layout remains unchanged such that there are three tiles windows with Terminal in the bottom right.

Screenshots
Expected behavior
before

Actual behavior
after

Versions:

  • macOS: 14.1
  • Amethyst: 0.20.0 (108)

Debug Info

$ /Applications/Amethyst.app/Contents/MacOS/Amethyst --debug-info
Version: 0.20.0 (108)

OS version: Version 14.1 (Build 23B2073)

Screens:
	(0.0, 0.0, 1512.0, 982.0) [(0.0, 0.0, 1512.0, 982.0)]

Configuration:
floating: (
)
screen-padding-bottom: 0
window-max-count: 0
window-margin-size: 1
enables-layout-hud: 1
restore-layouts-on-launch: 1
layouts: (
    tall,
    fullscreen
)
mod2: (
    option,
    shift,
    control
)
screen-padding-left: 0
enables-layout-hud-on-space-change: 1
window-margins: 0
ignore-menu-bar: 0
new-windows-to-main: 0
float-small-windows: 1
window-minimum-height: 0
focus-follows-mouse: 0
window-minimum-width: 0
mouse-swaps-windows: 0
floating-is-blacklist: 1
screen-padding-top: 0
follow-space-thrown-windows: 1
debug-layout-info: 0
use-canary-build: 0
mouse-follows-focus: 1
screen-padding-right: 0
window-resize-step: 5
mod1: (
    option,
    shift
)

Additional context

  • I am also able to reproduce this consistently with Finder (com.apple.finder) instead of Terminal
  • If I open a bunch of tabs, and then close them one by one, the layout is most often broken but sometimes fixed when closing a tab
@gigatexal
Copy link

Most folks have moved to iterm2 or kitty or a number of different terminal emulators might you try as a workaround a different terminal emulator like iterm or kitty to see -- on the off chance -- this is native-terminal related?

@joelklint
Copy link
Author

Hi @gigatexal 👋 It seems like it is not specifically related to the native terminal as I can reproduce it consistently with Finder aswell

@ianyh
Copy link
Owner

ianyh commented Mar 15, 2024

I suspect the problem is native macOS window tabs, in general. Each "tab" is actually a separate window.

@joelklint
Copy link
Author

@ianyh Aha is that so? That would make a lot of sense. I can reproduce it with Freeform (com.apple.freeform) aswell. Safari tabs works without any issue so they probably use another implementation.

Do you know any way around this which Amethyst could implement to support native macOS window tabs?

@ianyh
Copy link
Owner

ianyh commented Mar 15, 2024

We try to associate tabs correctly already. Something might have regressed, though.

@joelklint
Copy link
Author

What can I do to help? Can you point me to the code which runs when a new window opens? 🙂

@ianyh
Copy link
Owner

ianyh commented Mar 15, 2024

I think it's this function.

func swapInTab(window: Window) {

@joelklint
Copy link
Author

@gigatexal kitty is experiencing issues aswell, tracked by #1335

@ianyh ianyh added the bug label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants