kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.12k stars 971 forks source link

macOS `macos_traditional_fullscreen` did not work after create window #6917

Closed hiberabyss closed 10 months ago

hiberabyss commented 10 months ago

Describe the bug When in traditional fullscreen mode, after do some operations, kitty will be in wrong state with extra bar:

image

The bar is unexpected in fullscreen mode. And when try to select word, it choose wrong words not same line as cursor.

To Reproduce

I have following custom map to toggle background opacity:

action_alias run_kitten launch --allow-remote-control --type=background kitten
map super+u run_kitten @set-background-opacity --toggle 1

Steps to reproduce the behavior:

  1. Start kitty with argument --start-as=fullscreen
  2. Press Cmd + u
  3. Create new window with cmd+enter
  4. Error occured, kitty will have the extra bar

Screenshots If applicable, add screenshots to help explain your problem.

Environment details

kitty 0.31.0 (b247fda672) created by Kovid Goyal
Darwin hbliu-mac13 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64
ProductName:        macOS ProductVersion:       14.2 BuildVersion:      23C64
Frozen: True
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /opt/homebrew/bin/zsh
Loaded config files:
  /Users/hbliu/.config/kitty/kitty.conf

Config options different from defaults:
allow_remote_control         yes
background_opacity           0.8
copy_on_select               clipboard
dynamic_background_opacity   True
font_family                  Source Code Pro
font_size                    13.0
macos_option_as_alt          3
macos_traditional_fullscreen True
shell                        zsh
symbol_map:
    U+23fb - U+23fe → Symbols Nerd Font Mono
    U+2665 - U+2665 → Symbols Nerd Font Mono
    U+26a1 - U+26a1 → Symbols Nerd Font Mono
    U+2b58 - U+2b58 → Symbols Nerd Font Mono
    U+e000 - U+e00a → Symbols Nerd Font Mono
    U+e0a0 - U+e0a3 → Symbols Nerd Font Mono
    U+e0b0 - U+e0d4 → Symbols Nerd Font Mono
    U+e200 - U+e2a9 → Symbols Nerd Font Mono
    U+e300 - U+e3e3 → Symbols Nerd Font Mono
    U+e5fa - U+e6aa → Symbols Nerd Font Mono
    U+e700 - U+e7c5 → Symbols Nerd Font Mono
    U+ea60 - U+ebeb → Symbols Nerd Font Mono
    U+f000 - U+f2e0 → Symbols Nerd Font Mono
    U+f300 - U+f32f → Symbols Nerd Font Mono
    U+f400 - U+f4a9 → Symbols Nerd Font Mono
    U+f500 - U+f8ff → Symbols Nerd Font Mono
    U+f0001 - U+f1af0 → Symbols Nerd Font Mono
tab_bar_style                powerline
tab_title_template           {index} {fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}
Added shortcuts:
    cmd+f →  launch --type=overlay --stdin-source=@screen_scrollback fzf --cycle
    cmd+u →  run_kitten @set-background-opacity --toggle 1
    ctrl+opt+z →  toggle_layout stack
Changed shortcuts:
    cmd+1 →  goto_tab 1
    cmd+2 →  goto_tab 2
    cmd+3 →  goto_tab 3
    cmd+4 →  goto_tab 4
    cmd+5 →  goto_tab 5
Colors:
    active_tab_background        #979eab   
    active_tab_foreground        #282c34   
    background                   #282c34   
    color0                       #282c34   
    color1                       #e06c75   
    color10                      #56b6c2   
    color11                      #e5c07b   
    color12                      #61afef   
    color13                      #be5046   
    color14                      #56b6c2   
    color15                      #abb2bf   
    color2                       #98c379   
    color3                       #e5c07b   
    color4                       #61afef   
    color5                       #be5046   
    color6                       #56b6c2   
    color7                       #979eab   
    color8                       #393e48   
    color9                       #d19a66   
    foreground                   #979eab   
    inactive_tab_background      #282c34   
    inactive_tab_foreground      #abb2bf   

Important environment variables seen by the kitty process:
    PATH                                /Applications/kitty.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin
    LANG                                en_US.UTF-8
    SHELL                               /opt/homebrew/bin/zsh

Additional context Try to reproduce the problem with kitty --config NONE if you cannot then post a minimal kitty.conf that reproduces the problem. If the problem involves interaction with some other terminal program post a minimal config for that program to reproduce the problem as well.

kovidgoyal commented 10 months ago

Does not reproduce for me runninng from master using the steps:

1) kitty --config NONE --start-as fullscreen -o macos_traditional_fullscreen=y 2) Press ctrl+shift+u 3) Press ctrl_shift+enter

I dont quite understand your issue, but it may be a duplicate of #6883 or the fix for that issue fixed yours as well.