-
-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window Menu Bug on macOS 10.15.2 #992
Comments
I can reproduce it when no windows are open. Keep opening and closing the same file from the command line. Steps Taken:
I'm still working on reproducing the version with Windows open. Will update when I have more. |
@isaki It's true, this menu items are connected to the same source. These additional menus are added and removed by macOS event handlers. The additional check should be done here. AFAIK, any other menus are not duplicated accidentally |
@eirnym Please let me know if there is something you want me to test or if you need more information. I'm more than happy to help in any way I can! |
This seems to be the same bug as the other listed ones (#566), except in Catalina it is worse. I actually haven't upgraded to Catalina yet, but I probably should, but it's really the same issue (I think). |
Previously MacVim would see a lot of duplicate window menu items like "Enter Full Screen" or "Tile Window to Left of Screen" when the user toggles between two windows. This is because the `setWindowsMenu:` call was injecting these items, but AppKit isn't smart enough to de-duplicate them (unlike the window list at the bottom). Just fix this by making a copy of the main menu before passing it in. This way every time we try to set a main menu (which happens whenever we jump among Vim windows as each Vim can have different menu items), it will be set with a fresh one that doesn't have the injected menu items in it. Also, set NSFullScreenMenuItemEverywhere to prevent AppKit from injecting "Enter Full Screen" items. MacVim already has similar menu items to handle that. Also, remove old private API call to `setAppleMenu:`. As far as I could tell this is not useful anymore in recent macOS versions and that line of code was written in 2008. Fix macvim-dev#566, Fix macvim-dev#992
Previously MacVim would see a lot of duplicate window menu items like "Enter Full Screen" or "Tile Window to Left of Screen" when the user toggles between two windows. This is because the `setWindowsMenu:` call was injecting these items, but AppKit isn't smart enough to de-duplicate them (unlike the window list at the bottom). Just fix this by making a copy of the main menu before passing it in. This way every time we try to set a main menu (which happens whenever we jump among Vim windows as each Vim can have different menu items), it will be set with a fresh one that doesn't have the injected menu items in it. - This also requires adding a refresh functionality because adding/removing items to the original menu no longer get automatically reflected to the app since it only knows about the copied version. Also, set NSFullScreenMenuItemEverywhere to prevent AppKit from injecting "Enter Full Screen" items. MacVim already has similar menu items to handle that. Also, remove old private API call to `setAppleMenu:`. As far as I could tell this is not useful anymore in recent macOS versions and that line of code was written in 2008. Fix macvim-dev#566, Fix macvim-dev#992
Updated to Vim 8.2.1719. Features ==================== Touch Bar improvements -------------------- Touch Bar now supports submenus, and allows mixed icon/text displays using `tmenu`. When in edit modes (e.g. insert), it will also display an emoji picker as well. See `:help touchbar` for documentation. #1084 Fixes ==================== - Window menu no longer shows duplicate "Enter Full Screen" or "Tile Window to Left of Screen" entries whenever the user switches among different MacVim windows. #566 #992 - Fix issue where going to full screen mode when titlebar appearance is set to "hidden" would result in lost focus of the window. #1078 - The password dialog box when using `:!sudo` or other commands that require password entry (`macvim-askpass`) will no longer focus on Finder, and will keep the focus on MacVim. #1091 - Fix minor wrong tooltip in the "Appearance" preference pane. #1087 - "General" preference pane will now be correctly sized when Sparkle updater is disabled (e.g. Homebrew builds). #1089 - Misc issues were fixed by Vim upstream, e.g. `vimgrep` causing a crash, and odd behaviors with using Shift-O on the first line. #1082 #1083 Compatibility ==================== Requires macOS 10.9 or above. Script interfaces have compatibility with these versions: - Lua 5.3 - Perl 5.18 - Python2 2.7 - Python3 3.8 - Ruby 2.7
Describe the bug
The Window menu has many repeated, duplicate entries. This is similar to #566 and #593.
To Reproduce
TBD
Expected behavior
The menu should not have so many duplicates.
Screenshots
Environment (please complete the following information):
Additional context
This is very reminiscent of a previous bug in this menu; however in this case I did not open windows that were already open (which is my reliable way of triggering the previous bug). I will update this thread once I find a way to reliably reproduce this.
The text was updated successfully, but these errors were encountered: