You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a minimal MacVim experience by removing the titlebar from the application. I was inspired by https://tuananh.org/2015/01/11/a-minimal-iterm2-setup/ which was actually being picked up by the development team as an option.
By removing NSTitledWindowMask (0x1), you've essentially set NSBorderlessWindowMask (0x0); none of the other values you are still OR'ing into the style masks set the low bit of the value to 1.
A window with NSBorderlessWindowMask can't become key or main, and thus can't get keyboard input (that's why you hear the bells when you type). The NSWindow needs to return YES from canBecomeMainWindow and/or canBecomeKeyWindow to change this behavior.
Fortunately MacVim already has a window subclass (MMWindow), so you should be able to fix this by adding one or both of:
I'm not sure whether or not supporting this is something MacVim would want (and if so, how to expose the preference), that's probably for @douglasdrumond to decide.
Activity
jpetrie commentedon Jun 4, 2015
By removing
NSTitledWindowMask(0x1), you've essentially setNSBorderlessWindowMask(0x0); none of the other values you are still OR'ing into the style masks set the low bit of the value to 1.A window with
NSBorderlessWindowMaskcan't become key or main, and thus can't get keyboard input (that's why you hear the bells when you type). TheNSWindowneeds to returnYESfromcanBecomeMainWindowand/orcanBecomeKeyWindowto change this behavior.Fortunately MacVim already has a window subclass (
MMWindow), so you should be able to fix this by adding one or both of:to
MMWindow.m. I think (I haven't tested it).I'm not sure whether or not supporting this is something MacVim would want (and if so, how to expose the preference), that's probably for @douglasdrumond to decide.
splhack commentedon Nov 5, 2015
Hmm, no-title-bar window is not fancy for me, but you can try the pull request #111
splhack commentedon Dec 8, 2015
#111 is ready to merge. @oschrenk could you test it?
splhack commentedon Dec 9, 2015
#111 merged.