yatli / fvim

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

FVimToggleFullScreen not untoggling on Linux #50

Closed jjohnson338 closed 4 years ago

jjohnson338 commented 5 years ago

OS: Arch Linux Desktop: Budgie

The :FVimToggleFullScreen command works when toggling into fullscreen, but attempting to toggle out of full screen appears to do nothing.

yatli commented 5 years ago

uh oh.. so we have to figure out an alternative escape hatch :)

yatli commented 5 years ago

@jjohnson338 there might be a silent exception that prevented the exit sequence. could you try to enable logging and upload the captured logs?

logging can be enabled with --trace-to-file, the file will be created in ~/.config/fvim

jjohnson338 commented 5 years ago

Hi @yatli, I've updated to the latest release and captured the trace as you asked. The only actions I took in the trace were as follows: 1) Launch fvim 2) Toggle Fullscreen On 3) Toggle Fullscreen Off 4) Quit

Log Capture

yatli commented 5 years ago

after the first ToggleFullscreen, the buffer size changes correctly, but nothing happened after the second.

Could you please try alt-drag the (failed) untoggled window down a little bit and see if the title bar is restored? My guess is that title bar is restored correctly, but the window position information is lost, so it got stuck at (0,0)

jjohnson338 commented 5 years ago

@yatli , I tried both dragging the window around and using some set keybinds to maximize/un-maximize the window, no action seemed to have any affect. fvim still appeared to be in it's full-screen mode.

yatli commented 5 years ago

do you mean that when you drag the window, you still don't see the title bar, or it simply didn't move around?

jjohnson338 commented 5 years ago

@yatli When I alt+drag the FVim window following toggling off FullScreen, I don't see the titlebar and the window doesn't move. There is no visual change.

yatli commented 5 years ago

does alt+drag move other windows in your desktop environment?

jjohnson338 commented 5 years ago

Yes. I needed to set it up, but I have confirmed that works as expected for other applications. It appears to me as if fvim never leaves FullScreen mode. I haven't tried with other desktop environments, so it could potentially be some isolated conflict with Budgie itself?

yatli commented 5 years ago

@thautwarm could you please help to test this out? If it does not work, I'll set up a VM and fix it there.

jjohnson338 commented 5 years ago

@yatli I just tested this feature on Fedora 29 which is bundled with Gnome 3 by default (which Budgie is build from). The fullscreen toggle worked there. So I'm more confident now saying it's a issue only on Budgie

yatli commented 5 years ago

yeah, from my (outdated) understanding of linux DE, anything not fixed to the root window can be alt-dragged, include a fullscreen-ed window. some terminal emulators even automatically resume the title bar when being alt-dragged.

so if something is stuck and refuse to be moved around, it must be stuck in a special state (e.g. fixed to the root window)

yatli commented 5 years ago

@jjohnson338 does this work for you: https://github.com/lambdalisue/vim-fullscreen

edit: most likely it won't work directly, but you can check out wmctrl mentioned there

jjohnson338 commented 5 years ago

@yatli I installed both the plugin and wmctrl. Fullscreen toggling via that plugin works fine on my machine.

yatli commented 5 years ago

I've finally set up a Fedora VM for testing.. Will install Budgie and try it out.

yatli commented 5 years ago

@jjohnson338 Fedora30+Budgie works well on my side.

jjohnson338 commented 5 years ago

@yatli Thanks for testing. Can confirm with the latest release I'm still running into this issue. I did spin up neovim-qt and ran what should be their synonymous function:

call rpcnotify(0, 'Gui', 'WindowFullScreen', 1)
call rpcnotify(0, 'Gui', 'WindowFullScreen', 0)

Fullscreen toggles correctly there. Not sure what is special (or cursed 😜) about my setup.

thautwarm commented 5 years ago

@yatli Sorry for the late reply. I'm at a ddl now and will check this by 22. Currently my internet fails at dotnet build -c Release...

yatli commented 5 years ago

No worry. Take your time!

From: Taine Zhao notifications@github.com Sent: Tuesday, September 17, 2019 9:18 AM To: yatli/fvim fvim@noreply.github.com Cc: Yatao Li yatli@microsoft.com; Mention mention@noreply.github.com Subject: Re: [yatli/fvim] FVimToggleFullScreen not untoggling on Linux (#50)

@yatlihttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyatli&data=02%7C01%7Cyatli%40microsoft.com%7C467d652bcd8c44a1f88f08d73b0ce4ef%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637042798890105027&sdata=9Y1%2BWqZgMBDoUqBZB1EIuD79bmlQeQSsjGLNaCeHm0Q%3D&reserved=0 Sorry for the late reply. I'm at a ddl now and will check this by 22. Currently my internet fails at dotnet build -c Release...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyatli%2Ffvim%2Fissues%2F50%3Femail_source%3Dnotifications%26email_token%3DAE5Z7MCEEIQPM62S67NRXJ3QKAV43A5CNFSM4IQWDDI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD627EMA%23issuecomment-532017712&data=02%7C01%7Cyatli%40microsoft.com%7C467d652bcd8c44a1f88f08d73b0ce4ef%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637042798890105027&sdata=eJTALdJLpf%2FxChnUirmS55RcwuvRB5d6G6pwSWKQriE%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAE5Z7MBFLRBHC4CBE66LI23QKAV43ANCNFSM4IQWDDIQ&data=02%7C01%7Cyatli%40microsoft.com%7C467d652bcd8c44a1f88f08d73b0ce4ef%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637042798890115025&sdata=EuuDeZ7dvGGq8l%2B47UGLLipK4NQJ3jCUoGn9WsyrRHQ%3D&reserved=0.

yatli commented 5 years ago

@jjohnson338 if you feel like digging into this problem, you can use VSCode to set a breakpoint at EditorViewModel.fs, around line 73, function toggleFullScreen

jjohnson338 commented 5 years ago

@yatli I'll attempt to debug it this weekend. Thanks for the tip!

jjohnson338 commented 5 years ago

@yatli Just letting you know I haven't forgotten about this. I need to borrow an adapter from friend so I can hookup an external monitor to debug. Will report back when I have findings or a fix.

yatli commented 4 years ago

As of v0.2.306 this seems to be fixed? @jjohnson338