withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.05k stars 63 forks source link

Autocomplete Window Wrong Place #2067

Open ameasere opened 1 year ago

ameasere commented 1 year ago

Checks

Operating system

Linux 6.0.8-zen1-1-zen - "Garuda Linux"

Expected behaviour

Fig's autocomplete menu should appear on the Alacritty terminal window, not in the top left corner of the screen or in the centre of the screen.

Actual behaviour

Fig will show it's autocomplete either in the centre of the screen or in the top left of the left-most monitor. This window will also have blur, despite picom's configuration file containing the listed entry to exclude Fig from blur-background and the other 2 excludes.

image

image

Steps to reproduce

1) Install Fig via the listed Curl/Bash command on the website. 2) Add i3 and picom configuration entries to their respective configuration files in ~/.config. 3) Add IBus environment variables if these do not automatically show up (using export command or manually entering them). 4) Run figterm into Alacritty, run fig doctor or fig restart if it is the first time running. 5) Type anything that has autocomplete.

Environment

fig-details:
  - 2.7.8
hardware-info:
  - model: 
  - model-id: 
  - chip-id: AMD Ryzen 5 5600X 6-Core Processor
  - cores: 6
  - mem: 31.27 GB
os-info:
  - kernel: 6.0.8-zen1-1-zen
  - distro: "Garuda Linux"
  - distro-build: rolling
environment:
  - shell: /usr/bin/zsh
  - terminal: alacritty
  - cwd: /home/leigh
  - exe-path: /usr/bin/fig
  - install-method: bash
  - env-vars:
    - DISPLAY: :0
    - FIGTERM_SESSION_ID: afc5938d-8f6e-4d8d-9b48-60205d1ec083
    - FIG_HOSTNAME: kara
    - FIG_TERM: 2.7.8
    - PATH: /home/leigh/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/leigh/.local/bin:/home/leigh/.local/share/JetBrains/Toolbox/scripts:/home/leigh/.fig/bin
    - SHELL: /usr/bin/zsh
    - TERM: xterm-256color
    - XDG_CURRENT_DESKTOP: i3
    - XDG_SESSION_DESKTOP: i3
    - XDG_SESSION_TYPE: x11
    - FIG_PID: 153692
    - FIG_SET_PARENT: afc5938d-8f6e-4d8d-9b48-60205d1ec083
DallanQ commented 1 year ago

fwiw, I'm having a similar problem with the gnome terminal and the fish shell - the autocomplete window appears in the top-left corner of the display.

ibus address is not null

fig doctor outputs

● Fig's support for Linux 6.0.6-76060006-generic - "Pop!_OS 22.04 LTS" is in development. It may not work properly on your system.

● Unsupported terminal, if you believe this is a mistake or would like to see support for your terminal, run fig issue

✔ Everything looks good!

env | grep ibus outputs

GTK_IM_MODULE=ibus QT_IM_MODULE=ibus GLFW_IM_MODULE=ibus XMODIFIERS=@im=ibus

fig _ should-figterm-launch outputs

❌ /usr/bin/figterm (4716) <- ✅ /usr/bin/fish (4752)

and xprop outputs

_NET_WM_STATE(ATOM) = _NET_WM_STATE_FOCUSED WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_DESKTOP(CARDINAL) = 0 _GTK_EDGE_CONSTRAINTS(CARDINAL) = 170 _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW WM_HINTS(WM_HINTS): Client accepts input or input focus: True Initial state is Normal State. bitmap id # to use for icon: 0x2e0002e bitmap id # of mask for icon: 0x2e00035 window id # of group leader: 0x2e00001 _GTK_THEME_VARIANT(UTF8_STRING) = XdndAware(ATOM) = BITMAP _GTK_MENUBAR_OBJECT_PATH(UTF8_STRING) = "/org/appmenu/gtk/window/0" _UNITY_OBJECT_PATH(UTF8_STRING) = "/org/appmenu/gtk/window/0" _NET_WM_ICON(CARDINAL) = Icon (48 x 48):

    ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░    
   ░▒░                                    ░▒░   
   ▒░                                      ░▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒ ▒▒▒     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▒   
   ▒░                                      ░▒   
   ▒▒░                                    ░▒▒   
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒   
   ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░   
    ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░    

_GTK_WINDOW_OBJECT_PATH(UTF8_STRING) = "/org/gnome/Terminal/window/1" _GTK_APPLICATION_OBJECT_PATH(UTF8_STRING) = "/org/gnome/Terminal" _GTK_UNIQUE_BUS_NAME(UTF8_STRING) = ":1.100" _GTK_APPLICATION_ID(UTF8_STRING) = "org.gnome.Terminal" _NET_WM_OPAQUE_REGION(CARDINAL) = 30, 23, 808, 4, 26, 27, 816, 525 _GTK_FRAME_EXTENTS(CARDINAL) = 26, 26, 23, 29 _NET_STARTUP_ID(UTF8_STRING) = "gnome-shell/Terminal/3539-0-malachi_TIME72506" _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0 WM_WINDOW_ROLE(STRING) = "gnome-terminal-window-b70fa8d5-e093-4efe-a7d1-2dae97f0c586" _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL _NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 48234508, 48234509 _NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x2e0000b WM_CLIENT_LEADER(WINDOW): window id # 0x2e00001 _NET_WM_PID(CARDINAL) = 4691 WM_LOCALE_NAME(STRING) = "en_US.UTF-8" WM_CLIENT_MACHINE(STRING) = "malachi" WM_NORMAL_HINTS(WM_SIZE_HINTS): program specified minimum size: 347 by 145 program specified base size: 0 by 0 window gravity: NorthWest WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST WM_CLASS(STRING) = "gnome-terminal-server", "Gnome-terminal" WM_ICON_NAME(STRING) = "xprop /home/dallan/rootsdex/enrichify" _NET_WM_ICON_NAME(UTF8_STRING) = "xprop /home/dallan/rootsdex/enrichify" WM_NAME(STRING) = "xprop /home/dallan/rootsdex/enrichify" _NET_WM_NAME(UTF8_STRING) = "xprop /home/dallan/rootsdex/enrichify"

ehahn9 commented 1 year ago

BTW, same problem here on maos iterm and terminal. doctor, restart makes no diff. logging out of the user and logging in makes no diff. cold reboot DOES (usually) fix, but temporarily (system sleep, perhaps?)

Really quite an unpleasant problem :-(

BTW, this does NOT seem to happen on my M1 air, but DOES happen reliably/repeatedly on 2 different M1 mini's

ash1khan commented 1 year ago

Same problem with fish shell on pop os

● Fig's support for Linux 6.0.12-76060006-generic - "Pop!_OS 22.04 LTS" is in development. It may not work properly on your system.

● Unsupported terminal, if you believe this is a mistake or would like to see support for your terminal, run `fig issue`

✔ Everything looks good!

Most probably it messed up with auto tiling. Restarting entire OS sometimes works.

dagadbm commented 1 year ago

I also have the same problem.

I am using WezTerm and tmux.

Sometimes it works ok sometimes it doesnt work okay.. even doing fig restart doesnt fix this..

alcastronic commented 1 year ago

I'm having the same issue with i3wm, alacritty on arch linux.

ehahn9 commented 1 year ago

Hi wonderful fig team: is there any update on this? On 2 of my machines, it's a deal-breaker for fig use which is a real shame as I'm such a fan!

alcastronic commented 1 year ago

Update: currently it works for me with i3wm and alacritty on arch linux. After a reboot and starting i-bus from the i3 config with:

exec --no-startup-id ibus-daemon -rRdx

And I have added the env variables to /etc/profile.d/start.sh

export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=ibus(:xim)?
export QT_IM_MODULE=ibus

However in the shell only XMODIFIERS=@im=ibus is set.

fig diagnostic

fig-details:
  - 2.15.0
hardware-info:
  - model:
  - model-id:
  - chip-id: AMD Ryzen 9 5950X 16-Core Processor
  - cores: 16
  - mem: 31.25 GB
os-info:
  - kernel: 6.1.22-1-lts
  - distro: "Arch Linux"
  - distro-build: rolling
environment:
  - shell: /usr/bin/zsh
  - terminal: <unknown>
  - cwd: /home/tronic
  - exe-path: /usr/bin/fig
  - install-method: unknown
  - env-vars:
    - DISPLAY: :0
    - FIGTERM_SESSION_ID: 7a5e3f87-cca6-4905-9e39-af0dab97ff65
    - FIG_PID: 195122
    - FIG_SET_PARENT: 7a5e3f87-cca6-4905-9e39-af0dab97ff65
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.15.0
    - PATH: /home/tronic/.rbenv/shims:/home/tronic/.local/bin/:/home/tronic/go/bin:/home/tronic/perl5/bin:/home/tronic/.nvm/versions/node/v16.13.2/bin:/home/tronic/.rbenv/shims:/home/tronic/.local/bin/:/home/tronic/go/bin:/home/tronic/perl5/bin:/usr/lib/hardening-wrapper/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/mnt/st2/android/android-sdk/platform-tools:/mnt/st2/android/android-sdk/tools:/mnt/st2/android/android-sdk/tools/bin:/mnt/st2/android/android-sdk/emulator:/mnt/st2/android/android-sdk/cmdline-tools/latest/bin:/home/tronic/.dotnet/tools:/usr/lib/emscripten:/opt/rocm-5.3.0/bin:/opt/rocm-5.3.0/hip/bin:/home/tronic/.local/bin:/home/tronic/.fig/bin
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - XDG_CURRENT_DESKTOP: Unity
    - XDG_SESSION_TYPE: x11
    - XMODIFIERS: @im=ibus

The suggestion window appears right next to the cursor.

image

I'm not sure which of the steps fixed it and wether it stays like that. I'll update here.

gertjana commented 1 year ago

I recently got this issue, on a new laptop (Mac M1) menu at the left bottom corner of the laptop, while my iterm2 window with fish is open on an external monitor

fig-details:
  - 2.16.0
hardware-info:
  - model:
  - model-id:
  - chip-id: Apple M1 Max
  - cores: 10
  - mem: 32.00 GB
os-info:
  - macOS 13.4.1 (22F82)
environment:
  - shell: /opt/homebrew/Cellar/fish/3.6.0/bin/fish
  - terminal: iterm
  - cwd: /Users/gertjan.assies/PersonalProjects/blog
  - exe-path: /opt/homebrew/bin/fig
  - install-method: brew
  - env-vars:
    - FIG_TERM: 2.16.0
    - TERM: xterm-256color
    - FIG_PARENT:
    - PATH: /Users/gertjan.assies/.rd/bin:/opt/homebrew/Cellar/asdf/0.12.0/libexec/bin:/Users/gertjan.assies/go/bin:/opt/homebrew/bin:/Users/gertjan.assies/.asdf/shims:/Users/gertjan.assies/.fig/bin:/Users/gertjan.assies/.local/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
    - FIG_PID: 42203
    - FIGTERM_SESSION_ID: 64b69080-11c2-489e-a4b9-a1d276b963b8
    - FIG_SET_PARENT: w0t0p0:32EA3272-8545-4DD9-BD93-31F27215B823
    - SHELL: /opt/homebrew/bin/fish
noahdatasherpas commented 1 year ago

I also have the same issue. SS for reference:

image

fig-details:
  - 2.16.0
hardware-info:
  - model:
  - model-id:
  - chip-id: Apple M1 Pro
  - cores: 10
  - mem: 16.00 GB
os-info:
  - macOS 13.0.0 (22A380)
environment:
  - shell: /bin/zsh
  - terminal: iterm
  - cwd: /Users/noahgary
  - exe-path: /opt/homebrew/bin/fig
  - install-method: brew
  - env-vars:
    - FIGTERM_SESSION_ID: ee6ab77a-ca4b-462c-8ab4-074ff6a2a9ca
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.16.0
    - PATH: /Users/noahgary/Code/build/gcloud/google-cloud-sdk/bin:/opt/homebrew/opt/openjdk@11/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Library/Apple/usr/bin:/Users/noahgary/.fig/bin:/Users/noahgary/.local/bin
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: com.googlecode.iterm2
    - FIG_PID: 69878
    - FIG_SET_PARENT: ee6ab77a-ca4b-462c-8ab4-074ff6a2a9ca

It also only works the first time and then stops working...

Ugenx commented 1 year ago

I also have the same issue. SS for reference:

image

fig-details:
  - 2.16.0
hardware-info:
  - model:
  - model-id:
  - chip-id: Apple M1 Pro
  - cores: 10
  - mem: 16.00 GB
os-info:
  - macOS 13.0.0 (22A380)
environment:
  - shell: /bin/zsh
  - terminal: iterm
  - cwd: /Users/noahgary
  - exe-path: /opt/homebrew/bin/fig
  - install-method: brew
  - env-vars:
    - FIGTERM_SESSION_ID: ee6ab77a-ca4b-462c-8ab4-074ff6a2a9ca
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.16.0
    - PATH: /Users/noahgary/Code/build/gcloud/google-cloud-sdk/bin:/opt/homebrew/opt/openjdk@11/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Library/Apple/usr/bin:/Users/noahgary/.fig/bin:/Users/noahgary/.local/bin
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: com.googlecode.iterm2
    - FIG_PID: 69878
    - FIG_SET_PARENT: ee6ab77a-ca4b-462c-8ab4-074ff6a2a9ca

It also only works the first time and then stops working...

Identical issue here.

  - 2.16.0
hardware-info:
  - model:
  - model-id:
  - chip-id: Apple M1 Pro
  - cores: 10
  - mem: 16.00 GB
os-info:
  - macOS 13.5.0 (22G74)
environment:
  - shell: /bin/zsh
  - terminal: iterm
  - cwd: /Users/redacted
  - exe-path: /opt/homebrew/bin/fig
  - install-method: brew
  - env-vars:
    - FIGTERM_SESSION_ID: eb6e9964-9614-4db1-a08a-e89835e71d91
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.16.0
    - PATH: /Users/redacted/.nvm/versions/node/v14.21.2/bin:/Users/redacted/Downloads/google-cloud-sdk/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/redacted/.orbstack/bin:/Users/redacted/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/redacted/.fig/bin:/Users/redacted/.local/bin:/Users/redacted/.krew/bin:/Users/redacted/go/bin:/Users/redacted/.dotnet/tools:/Users/redacted/.istioctl/bin:/Users/redacted/Library/Python/3.9/bin:/Users/redacted/Library/Python/3.11/bin
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: com.googlecode.iterm2
    - FIG_PID: 17594
    - FIG_SET_PARENT: eb6e9964-9614-4db1-a08a-e89835e71d91

Just noticed an interesting behavior wherein I was able to get the menu to show up in my vscode built-in terminal and when switching to my iterm window, the autocomplete menu was popping up in the vscode terminal location on my screen instead of in iterm.

image

This only seems to happen in combination with my iterm "global hotkey window" which I depend on pretty much exclusively. A regular iterm window seems to work fine and recaptures the fig menu popup location correctly.

JinlongHuang commented 12 months ago

Restarting my Mac seems to make it work.