This is just a tiny thing (and possibly purely caused by Electron?)
When menu bar is hidden (so that it can be opened using Alt), closing it will cause a little flicker at the bottom of the screen, apparently the same height as the menu bar.
Would be nice to have it fixed!
Demo of the bug: https://gfycat.com/AnchoredWideBarnacle
Somewhat related: is there a way to disable the Alt shortcut? Sometimes I use Alt for other keybindings and it's very annoying to have the menu popup everytime, but as @rococode I am not sure if this is an Electron thing or not.
Just for the record, I'm Alt's victim as well.
In my i3 setup, Alt+<number> is used to switch workspace - so every time I switch into a workspace that has Oni open, the menu pops (really frustrating actually).
Could be nice to fix it (change to on release instead of on press?) or make it configurable.
Ya, this sounds very annoying! This looks like default Electron behavior, as we don't do anything special here - but we could potentially disable its default handing of the Alt key.
I'm not able to reproduce this though on my Arch Linux box, but it's likely that I'm just not doing something correctly. What steps should I follow for this?
When menu bar is hidden (so that it can be opened using Alt)
I tried setting it to fullscreen and a few other things, but wasn't seeing the menu-open-on-Alt behvaior.
I'm running on Windows 10 so it may be a windows-specific behavior? I just have set "oni.hideMenu": true, in my config.
It's not Windows specific, I have the same issue on Arch.
Em 13/01/2018 18:36, "rococo" notifications@github.com escreveu:
I'm running on Windows 10 so it may be a windows-specific behavior? I just
have set "oni.hideMenu": true, in my config.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/onivim/oni/issues/1250#issuecomment-357465435, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAVNoEcBBcuWdEkYYPv3XjtmsrONLeafks5tKROygaJpZM4RV__1
.
Thanks for the info, @rococode .
I believe for @badosu and @TalAmuyal - looks like oni.hideMenu controls _two_ properties of the electron window:
const hideMenu: boolean = configuration.getValue("oni.hideMenu")
browserWindow.setAutoHideMenuBar(hideMenu)
browserWindow.setMenuBarVisibility(!hideMenu)
From the electron documentation, both of these settings are set up to listen to Alt to show the menu bar again: https://github.com/electron/electron/blob/master/docs/api/browser-window.md#winsetmenubarvisibilityvisible-windows-linux
I think what we'd need to do here is suppress the alt key behavior (ie, using preventDefault and stopPropagation), and potentially add a setting to control that. We'd need to test and make sure it didn't prevent other behavior (like AltGr keys)
Don't know if this belongs here or not but I have a similar UI flicker when I toggle the sidebar
I've just added an option for "oni.hideMenu": "hidden" which disables the bar entirely.
Most helpful comment
I've just added an option for
"oni.hideMenu": "hidden"which disables the bar entirely.