yatli / fvim

Cross platform Neovim front-end UI, built with F# + Avalonia
MIT License
1.34k stars 30 forks source link

fvim is automatically minimized on startup and click it on status bar does not restore the window #106

Closed jdhao closed 3 years ago

jdhao commented 4 years ago

Using fvim on Windows 10 (version 1803). When I start fvim initially, it can show its window on the front of the desktop. But after sometime, when I start fvim.exe, it is minimized automatically to the status bar. Clicking the icon on status bar can not bring it to the front. Only by right clicking the fvim icon on status bar and click Fvim.exe can I start fvim window shown in the desktop.

image

yatli commented 4 years ago

Never experienced this. Could you elaborate a bit on the repro steps?

yzlnew commented 4 years ago

Same here. Fvim hangs there when starting. Can't get it started sometimes. Windows 10 1903

yatli commented 4 years ago

@yzlnew could you please run fvim --trace-to-file and attach %LocalAppData%/fvim/fvim-_startup_time_.log?

yzlnew commented 4 years ago
log: fvim started. time = 2020/3/3 16:25:40
model: starting neovim instance...
model: opts = { intent = Start
  logToStdout = false
  logToFile = true
  logPatterns = None
  args = ["--embed"]
  program = "nvim"
  stderrenc = System.Text.UTF8Encoding+UTF8EncodingSealed
  serveropts = StartNew }
neovim.process: Starting process. Program: nvim; Arguments: --embed
neovim.process: begin read loop
model: commencing early initialization...
neovim.process: call: 0 -> [0,0,"nvim_get_api_info",[]]
model: available ui options: set
  ["ext_cmdline"; "ext_hlstate"; "ext_linegrid"; "ext_messages"; "ext_multigrid";
   "ext_popupmenu"; "ext_tabline"; "ext_termcolors"; "ext_wildmenu"; ...]
neovim.process: call: 1 -> [0,1,"nvim_set_var",["fvim_loaded",1]]
neovim.process: call: 2 -> [0,2,"nvim_set_client_info",["FVim",{"major":"0","minor":"2","prerelease":"dev"},"ui",{},{"InstanceId":"d9437d9b-1bd7-40a6-868f-2622e9ba87d2"}]]
neovim.process: call: 3 -> [0,3,"nvim_list_chans",[]]
model: FVim connected clients: [("d9437d9b-1bd7-40a6-868f-2622e9ba87d2", 1)]
model: FVim client channel is: 1
neovim.process: call: 4 -> [0,4,"nvim_command",["let g:clipboard = {  'name': 'FVimClipboard',  'copy': {     '+': {lines, regtype -> rpcrequest(1, 'set-clipboard', lines, regtype)},     '*': {lines, regtype -> rpcrequest(1, 'set-clipboard', lines, regtype)},   },  'paste': {     '+': {-> rpcrequest(1, 'get-clipboard')},     '*': {-> rpcrequest(1, 'get-clipboard')},  },}"]]
neovim.process: call: 5 -> [0,5,"nvim_set_var",["fvim_channel",1]]
neovim.process: call: 6 -> [0,6,"nvim_command",["command! -nargs=0 FVimDetach call rpcnotify(1, 'remote.detach')"]]
neovim.process: call: 7 -> [0,7,"nvim_command",["command! -nargs=0 FVimToggleFullScreen call rpcnotify(1, 'ToggleFullScreen', 1)"]]
neovim.process: call: 8 -> [0,8,"nvim_command",["command! -nargs=1 -complete=expression FVimCursorSmoothMove call rpcnotify(1, 'cursor.smoothmove', <args>)"]]
neovim.process: call: 9 -> [0,9,"nvim_command",["command! -nargs=1 -complete=expression FVimCursorSmoothBlink call rpcnotify(1, 'cursor.smoothblink', <args>)"]]
neovim.process: call: 10 -> [0,10,"nvim_command",["command! -nargs=1 -complete=expression FVimFontLineHeight call rpcnotify(1, 'font.lineheight', <args>)"]]
neovim.process: call: 11 -> [0,11,"nvim_command",["command! -nargs=1 -complete=expression FVimFontAutoSnap call rpcnotify(1, 'font.autosnap', <args>)"]]
neovim.process: call: 12 -> [0,12,"nvim_command",["command! -nargs=1 -complete=expression FVimFontAntialias call rpcnotify(1, 'font.antialias', <args>)"]]
neovim.process: call: 13 -> [0,13,"nvim_command",["command! -nargs=1 -complete=expression FVimFontLigature call rpcnotify(1, 'font.ligature', <args>)"]]
neovim.process: call: 14 -> [0,14,"nvim_command",["command! -nargs=1 -complete=expression FVimFontDrawBounds call rpcnotify(1, 'font.drawBounds', <args>)"]]
neovim.process: call: 15 -> [0,15,"nvim_command",["command! -nargs=1 -complete=expression FVimFontAutohint call rpcnotify(1, 'font.autohint', <args>)"]]
neovim.process: call: 16 -> [0,16,"nvim_command",["command! -nargs=1 -complete=expression FVimFontSubpixel call rpcnotify(1, 'font.subpixel', <args>)"]]
neovim.process: call: 17 -> [0,17,"nvim_command",["command! -nargs=1 -complete=expression FVimFontLcdRender call rpcnotify(1, 'font.lcdrender', <args>)"]]
neovim.process: call: 18 -> [0,18,"nvim_command",["command! -nargs=1 -complete=expression FVimFontHintLevel call rpcnotify(1, 'font.hindLevel', <args>)"]]
neovim.process: call: 19 -> [0,19,"nvim_command",["command! -nargs=1 -complete=expression FVimFontNormalWeight call rpcnotify(1, 'font.weight.normal', <args>)"]]
neovim.process: call: 20 -> [0,20,"nvim_command",["command! -nargs=1 -complete=expression FVimFontBoldWeight call rpcnotify(1, 'font.weight.bold', <args>)"]]
neovim.process: call: 21 -> [0,21,"nvim_command",["command! -nargs=1 -complete=expression FVimKeyDisableShiftSpace call rpcnotify(1, 'key.disableShiftSpace', <args>)"]]
neovim.process: call: 22 -> [0,22,"nvim_command",["command! -nargs=1 -complete=expression FVimUIMultiGrid call rpcnotify(1, 'ui.multigrid', <args>)"]]
neovim.process: call: 23 -> [0,23,"nvim_command",["command! -nargs=1 -complete=expression FVimUIPopupMenu call rpcnotify(1, 'ui.popupmenu', <args>)"]]
neovim.process: call: 24 -> [0,24,"nvim_command",["command! -nargs=1 -complete=expression FVimUITabLine call rpcnotify(1, 'ui.tabline', <args>)"]]
neovim.process: call: 25 -> [0,25,"nvim_command",["command! -nargs=1 -complete=expression FVimUICmdLine call rpcnotify(1, 'ui.cmdline', <args>)"]]
neovim.process: call: 26 -> [0,26,"nvim_command",["command! -nargs=1 -complete=expression FVimUIWildMenu call rpcnotify(1, 'ui.wildmenu', <args>)"]]
neovim.process: call: 27 -> [0,27,"nvim_command",["command! -nargs=1 -complete=expression FVimUIMessages call rpcnotify(1, 'ui.messages', <args>)"]]
neovim.process: call: 28 -> [0,28,"nvim_command",["command! -nargs=1 -complete=expression FVimUITermColors call rpcnotify(1, 'ui.termcolors', <args>)"]]
neovim.process: call: 29 -> [0,29,"nvim_command",["command! -nargs=1 -complete=expression FVimUIHlState call rpcnotify(1, 'ui.hlstate', <args>)"]]
neovim.process: call: 30 -> [0,30,"nvim_command",["command! -nargs=1 -complete=expression FVimDrawFPS call rpcnotify(1, 'DrawFPS', <args>)"]]
neovim.process: call: 31 -> [0,31,"nvim_command",["command! -nargs=1 -complete=expression FVimCustomTitleBar call rpcnotify(1, 'CustomTitleBar', <args>)"]]
neovim.process: call: 32 -> [0,32,"nvim_command",["command! -nargs=1 -complete=expression FVimBackgroundOpacity call rpcnotify(1, 'background.opacity', <args>)"]]
neovim.process: call: 33 -> [0,33,"nvim_command",["command! -nargs=1 -complete=expression FVimBackgroundComposition call rpcnotify(1, 'background.composition', <args>)"]]
neovim.process: call: 34 -> [0,34,"nvim_command",["command! -nargs=1 -complete=expression FVimBackgroundAltOpacity call rpcnotify(1, 'background.altopacity', <args>)"]]
neovim.process: call: 35 -> [0,35,"nvim_command",["autocmd VimEnter * runtime! ginit.vim"]]
ui: GetTypeface: allocating new typeface Consolas:false:false
editorvm #1: fontConfig: glyphsize=9.000303268432617, 19, measured font size=16.37
mainwindow: configBackground: SolidBackground #00000000
cursor: render tick 0
cursor: setCursorAnimation: blink=false, move=false
mainwindow: set position: -32009, -32038
editor #1: viewmodel connected
cursor: render tick 1
editor #1: MeasureOverride: 1521.6, 780
editorvm #1: set measured size: 1521.6, 780
editor #1: MeasureOverride: 1024, 1088
editorvm #1: set measured size: 1024, 1088
model: attaching to nvim on first grid ready signal. size = 113 57
neovim.process: call: 36 -> [0,36,"nvim_ui_attach",[113,57,{"rgb":true,"ext_linegrid":true,"ext_popupmenu":true,"ext_multigrid":false,"ext_tabline":false,"ext_cmdline":false,"ext_wildmenu":false,"ext_messages":false,"ext_hlstate":false,"ext_termcolors":false}]]
theme: fontConfig: guifont=Consolas guifontwide=DengXian
ui: GetTypeface: allocating new typeface Consolas:false:false
editorvm #1: fontConfig: glyphsize=8.802372932434082, 18.4, measured font size=16.01
editorvm #1: fontConfig: glyphsize=8.802372932434082, 18.4, measured font size=16.01
theme: fontConfig: guifont=Consolas guifontwide=DengXian
ui: GetTypeface: allocating new typeface Consolas:false:false
editorvm #1: fontConfig: glyphsize=8.802372932434082, 18.4, measured font size=16.01
editorvm #1: fontConfig: glyphsize=8.802372932434082, 18.4, measured font size=16.01
cursor: setCursorAnimation: blink=false, move=true
cursor: setCursorAnimation: blink=true, move=true
def: parse_semantic_hlgroup: SpecialKey
def: parse_semantic_hlgroup: EndOfBuffer
def: parse_semantic_hlgroup: TermCursor
def: parse_semantic_hlgroup: TermCursorNC
def: parse_semantic_hlgroup: NonText
def: parse_semantic_hlgroup: Directory
def: parse_semantic_hlgroup: ErrorMsg
def: parse_semantic_hlgroup: IncSearch
def: parse_semantic_hlgroup: Search
def: parse_semantic_hlgroup: MoreMsg
def: parse_semantic_hlgroup: ModeMsg
def: parse_semantic_hlgroup: LineNr
def: parse_semantic_hlgroup: CursorLineNr
def: parse_semantic_hlgroup: Question
def: parse_semantic_hlgroup: StatusLine
def: parse_semantic_hlgroup: StatusLineNC
def: parse_semantic_hlgroup: VertSplit
def: parse_semantic_hlgroup: Title
def: parse_semantic_hlgroup: Visual
def: parse_semantic_hlgroup: VisualNC
def: parse_semantic_hlgroup: WarningMsg
def: parse_semantic_hlgroup: WildMenu
def: parse_semantic_hlgroup: Folded
def: parse_semantic_hlgroup: FoldColumn
def: parse_semantic_hlgroup: DiffAdd
def: parse_semantic_hlgroup: DiffChange
def: parse_semantic_hlgroup: DiffDelete
def: parse_semantic_hlgroup: DiffText
def: parse_semantic_hlgroup: SignColumn
def: parse_semantic_hlgroup: Conceal
def: parse_semantic_hlgroup: SpellBad
def: parse_semantic_hlgroup: SpellCap
def: parse_semantic_hlgroup: SpellRare
def: parse_semantic_hlgroup: SpellLocal
def: parse_semantic_hlgroup: Pmenu
def: parse_semantic_hlgroup: PmenuSel
def: parse_semantic_hlgroup: PmenuSbar
def: parse_semantic_hlgroup: PmenuThumb
def: parse_semantic_hlgroup: TabLine
def: parse_semantic_hlgroup: TabLineSel
def: parse_semantic_hlgroup: TabLineFill
def: parse_semantic_hlgroup: CursorColumn
def: parse_semantic_hlgroup: CursorLine
def: parse_semantic_hlgroup: ColorColumn
def: parse_semantic_hlgroup: QuickFixLine
def: parse_semantic_hlgroup: Whitespace
def: parse_semantic_hlgroup: NormalNC
def: parse_semantic_hlgroup: MsgSeparator
def: parse_semantic_hlgroup: NormalFloat
def: parse_semantic_hlgroup: MsgArea
def: parse_semantic_hlgroup: SpecialKey
def: parse_semantic_hlgroup: EndOfBuffer
def: parse_semantic_hlgroup: TermCursor
def: parse_semantic_hlgroup: NonText
def: parse_semantic_hlgroup: Directory
def: parse_semantic_hlgroup: ErrorMsg
def: parse_semantic_hlgroup: IncSearch
def: parse_semantic_hlgroup: Search
def: parse_semantic_hlgroup: MoreMsg
def: parse_semantic_hlgroup: ModeMsg
def: parse_semantic_hlgroup: LineNr
def: parse_semantic_hlgroup: CursorLineNr
def: parse_semantic_hlgroup: Question
def: parse_semantic_hlgroup: StatusLine
def: parse_semantic_hlgroup: StatusLineNC
def: parse_semantic_hlgroup: VertSplit
def: parse_semantic_hlgroup: Title
def: parse_semantic_hlgroup: Visual
def: parse_semantic_hlgroup: WarningMsg
def: parse_semantic_hlgroup: WildMenu
def: parse_semantic_hlgroup: Folded
def: parse_semantic_hlgroup: FoldColumn
def: parse_semantic_hlgroup: DiffAdd
def: parse_semantic_hlgroup: DiffChange
def: parse_semantic_hlgroup: DiffDelete
def: parse_semantic_hlgroup: DiffText
def: parse_semantic_hlgroup: SignColumn
def: parse_semantic_hlgroup: Conceal
def: parse_semantic_hlgroup: SpellBad
def: parse_semantic_hlgroup: SpellCap
def: parse_semantic_hlgroup: SpellRare
def: parse_semantic_hlgroup: SpellLocal
def: parse_semantic_hlgroup: Pmenu
def: parse_semantic_hlgroup: PmenuSel
def: parse_semantic_hlgroup: PmenuSbar
def: parse_semantic_hlgroup: PmenuThumb
def: parse_semantic_hlgroup: TabLine
def: parse_semantic_hlgroup: TabLineSel
def: parse_semantic_hlgroup: TabLineFill
def: parse_semantic_hlgroup: CursorColumn
def: parse_semantic_hlgroup: CursorLine
def: parse_semantic_hlgroup: ColorColumn
def: parse_semantic_hlgroup: QuickFixLine
def: parse_semantic_hlgroup: Whitespace
def: parse_semantic_hlgroup: MsgSeparator
def: parse_semantic_hlgroup: NormalFloat
theme: setOption: ArabicShape true
model: Grid #1 resized to 116 59
theme: setOption: AmbiWidth Single
theme: setOption: Emoji true
neovim.process: call: 37 -> [0,37,"nvim_ui_try_resize",[116,59]]
theme: setOption: Guifont ""
model: UpdateUICapabilities: "ext_popupmenu=false, ext_multigrid=false, ext_tabline=false, ext_cmdline=false, ext_wildmenu=false, ext_messages=false, ext_hlstate=false, ext_termcolors=false"
theme: setOption: UnknownOption [|"guifontset"; ""|]
theme: setOption: GuifontWide ""
theme: setOption: LineSpace 0
theme: setOption: UnknownOption [|"pumblend"; 0uy|]
theme: setOption: ShowTabline AtLeastTwo
theme: setOption: TermGuiColors false
theme: setOption: UnknownOption [|"ext_linegrid"; true|]
theme: setOption: UnknownOption [|"ext_multigrid"; false|]
theme: setOption: UnknownOption [|"ext_hlstate"; false|]
theme: setOption: UnknownOption [|"ext_termcolors"; false|]
neovim.process: call: 38 -> [0,38,"nvim_ui_set_option",["ext_popupmenu",false]]
mainwindow: update background color: Black
mainwindow: configBackground: SolidBackground Black
theme: setDefaultColors: White Black Red
theme: setOption: UnknownOption [|"ext_cmdline"; false|]
theme: setOption: UnknownOption [|"ext_popupmenu"; true|]
theme: setOption: UnknownOption [|"ext_tabline"; false|]
theme: setOption: UnknownOption [|"ext_wildmenu"; false|]
theme: setOption: UnknownOption [|"ext_messages"; false|]
theme: setDefaultColors: White Black Red
editorvm #1: buffer resize = { rows = 57
  cols = 113 }
model: unknown command [|"update_menu"; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||];
  [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||];
  [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||];
  [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||];
  [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||];
  [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||];
  [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||];
  [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]; ...|]
theme: setOption: TermGuiColors true
theme: setDefaultColors: White Black Red
mainwindow: update background color: #ff282828
mainwindow: configBackground: SolidBackground #ff282828
theme: setDefaultColors: #ffd4be98 #ff282828 Red
theme: setOption: ShowTabline Always
model: unknown command [|"update_menu"; [||]; [||]; [||]; [||]; [||]; [||]; [||]; [||]|]
theme: setOption: Guifont "OperatorMonoSSm NF:h16"
theme: fontConfig: guifont=OperatorMonoSSm NF guifontwide=DengXian
ui: GetTypeface: allocating new typeface OperatorMonoSSm NF:false:false
editorvm #1: fontConfig: glyphsize=9.6875, 18.4, measured font size=15.5
theme: setOption: GuifontWide "Sarasa Mono SC:h16"
theme: fontConfig: guifont=OperatorMonoSSm NF guifontwide=Sarasa Mono SC
editorvm #1: fontConfig: glyphsize=9.6875, 18.4, measured font size=15.5
editorvm #1: scroll: 53 57 0 113 2 0
cursor: render tick 2
cursor: render tick 3
editorvm #1: set cursor info, color = #ff2b4167 #ffd7d7d7 Aqua
editor #1: drawing 5 regions
model: Grid #1 resized to 105 59
neovim.process: call: 39 -> [0,39,"nvim_ui_try_resize",[105,59]]
ui: GetTypeface: allocating new typeface OperatorMonoSSm NF:false:true
editor #1: drawing end, time = 38ms.
cursor: setCursorAnimation: blink=true, move=true
cursor: setCursorAnimation: blink=true, move=true
cursor: setCursorAnimation: blink=true, move=true
yatli commented 4 years ago

mainwindow: set position: -32009, -32038

Huh? 🤔

Check %LocalAppData/fvim/config.json and see if there are abnormal coordinates.

yzlnew commented 4 years ago

mainwindow: set position: -32009, -32038

Huh? 🤔

Check %LocalAppData/fvim/config.json and see if there are abnormal coordinates.

Yes, fvim can be started after I delete this file. But I haven't touched this file before.

yatli commented 4 years ago

What's your monitor setup like -- the resolutions, and the DPI setting? FVim could've retrieved wrong coordinates.

We can also add a guard to the file to forget abnormal coordinates.

yzlnew commented 4 years ago

What's your monitor setup like -- the resolutions, and the DPI setting? FVim could've retrieved wrong coordinates.

We can also add a guard to the file to forget abnormal coordinates.

2560*1440 with 125% scale. And a second 1080p monitor.

jdhao commented 4 years ago

I am also using two displays with 1920x1080 resolutions. The scales are both set at 100%, and the resolutions are both set at 1920x1080.

yatli commented 4 years ago

Anything like a custom window manager, or some AHK script? AltDrag used to have a bug wrt DPI, and a window will be moved out of desktop area..

@yzlnew @jdhao could you please keep an eye on these environment settings, so that we can better repro the problem?

yzlnew commented 4 years ago

Nope, don't have any custom windows manager or AHK script. BTW my second monitor is in portrait mode.

yatli commented 4 years ago

If the fvim window is never moved out of bound, then it's a coordinate retrieval problem. Could be upstream problem.

upgradeQ commented 4 years ago

Same issue,windows 7 , but if you rename folder containing fvim.exe it will work normally.

yatli commented 4 years ago

Fixed

jdhao commented 4 years ago

@yatli I am still seeing this issue with your latest release. Running fvim from the command line to open a file (the PATH variable has been properly set), its icon is immediately minimized to the Windows task bar. Clicking the icon can not bring the program to the front.

Is there anything on the user side that needed to be done to resolve this issue?

Edit: deleting the config.json file under appdata/local/fvim/ seems to fix this issue for now.

yatli commented 4 years ago

@jdhao sorry for the trouble. The fix is from the other way (saving config) but loading side is still unchecked. So yeah you're spot on. Reopening this until then.

yatli commented 3 years ago

Got complete window position check against screen info now...