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
Non-native fullscreen broken with Core Text in macOS Sierra #312
Comments
Uh oh. I love non-native fullscreen mode. Unfortunately I don't have (and won't have) a Sierra beta to play around with. |
Have the same issue |
I can confirm this. The text will appear for almost a second, then disappear behind the background (except for where the cursor is). A keypress that scrolls the whole screen will temporarily bring the text back to where it should be, but then after a second it disappears again. |
still happening on the 2nd gold master of macOS Sierra |
Bump up for re-interest. This is really affecting my zen moment with MacVim 😄 |
We'll need to wait for Sierra to come out first so that the devs can work on it. |
Can confirm, this breaks for me as well :( |
I can unfortunately also confirm this with the most recent official Sierra (10.12) in combination with the latest stable MacVim 8.0 (110). |
🖐🏼 Same problem here! Any news on this issue? |
This is a bit annoying, since native full screen mode does not return focus to terminal if you launch MacVim GUI from the command line and then ext (I diff files in MacVim GUI and do it in full screen to see files side by side). |
Sorry to bug, any update on this? If I knew C or Objective-C I would totally try to help, but unfortunately I don't :( |
Here is an observation that might help the devs with debugging. If I recall correctly from long ago, non-native mode fullscreen involves painting the full screen with a color identical to that of the Vim background color, but underneath the "actual" MacVim window. (This is to make sure that there aren't borders left uncovered when the screen size isn't an exact multiple of the rows or columns.) All along, you may have seen this if you changed your colorscheme once already in NNFS, from a dark background scheme to a light one (or vice versa). If you made Anyway, wrt this disappearing text problem on Sierra, you can see that it's this "fake" background painting that's covering the text and the "actual" MacVim window. E.g.: start MacVim, do "colo MacVim" and "set bg=light". Then go into NNFS. The text will disappear underneath the white "fake" background. While still in NNFS, do "set bg=dark". Wait a second, and text will disappear underneath the fake white again. Go out of NNFS and then go right back in. Now the text disappears underneath the (now) I have no idea why this is happening on Sierra all of a sudden, but someone who knows what they're doing might now know where to start looking. |
Just to add my voice to the, this is happening to me on macOS Sierra on a 2014 MacBook Air. |
+1 |
+1 |
2 similar comments
+1 |
+1 |
Hi folks - can we stop with the +1ing? There is a subscribe button directly to the right of this thread, for the purpose of being notified when there's work being done on this issue: The +1s don't add to the discussion, and in many ways can be frustrating for both the developer and those who are only interested in following along with further work on this issue. |
It seems like NSView backing layer(graphic context) will lose all rendering result when MacVim renders cursor.
|
Is that supposed to be a workaround, or just to demonstrate the nature of the bug? For me, that It does, however, reveal that if the cursor is on the last line in the window (not the buffer), it's only the text on lines above that one that disappear, while the cursor's line is entirely visible. |
@nicksergeant I don't think people are +1'ing so they can subscribe. When there are 33 open issues on a project, isn't it nice to know which issues are affecting the most people? Is there an alternate mechanism in github for people to use to indicate their interest in an issue getting sorted? |
@trevvvy yup, you can add to the 👍 on the issue description itself: |
Is there any way I can tip some money to get this fixed? It's really causing me productivity problems and would love to see it fixed asap. |
Have anyone tried 10.12.2? |
I gave up and switched to neovim :| |
@splhack I'm using 10.12.1 and getting the same problem with fullscreen |
@ralphholzmann it is fixed with neovim? |
@splhack Having the same problem at 10.12.2 Beta (16C41b). |
i've been poking at this bug over nights and weekends when I get a bit of time to spare. The bug, near as I can tell, has to do with CoreText and borderless windows. The bug still repros even if you short-circuit the full-screen behavior like so:
(repros even with a window smaller than the screen size) The other thing I've noted is that what seems to happen is that each draw call is blowing away the previous window state: if you do |
The |
When you set a borderless style on a subclasses window in 10.12, the original behavior in which you could progressively draw partially on a stale window seems to be gone; it blanks the thing after each draw. It's totally unclear to me whether the CoreText engine as written was ever "correct", or maybe it just "accidentally worked" -- no documentation on the internets seems to indicate you're allowed to only draw CoreGraphics updates to a window in drawRect. This PR works around that by drawing onto a persistent background layer which we then blit to the screen. nn-fullscreen seems to work, as do most common operations. This PR also makes resizing a CoreGraphics view much smoother; the old code was pretty flickery. I haven't dealt with DrawSignDrawType yet; not sure how to trigger that code path. maintainers: am I on the right track here? Any tips? addreses macvim-dev#312 (though not fully, yet).
When you set a borderless style on a subclasses window in 10.12, the original behavior in which you could progressively draw partially on a stale window seems to be gone; it blanks the thing after each draw. It's totally unclear to me whether the CoreText engine as written was ever "correct", or maybe it just "accidentally worked" -- no documentation on the internets seems to indicate you're allowed to only draw CoreGraphics updates to a window in drawRect. This PR works around that by drawing onto a persistent background layer which we then blit to the screen. nn-fullscreen seems to work, as do most common operations. This PR also makes resizing a CoreGraphics view much smoother; the old code was pretty flickery. I haven't dealt with DrawSignDrawType yet; not sure how to trigger that code path. maintainers: am I on the right track here? Any tips? addreses macvim-dev#312 (though not fully, yet).
When you set a borderless style on a subclasses window in 10.12, the original behavior in which you could progressively draw partially on a stale window seems to be gone; it blanks the thing after each draw. It's totally unclear to me whether the CoreText engine as written was ever "correct", or maybe it just "accidentally worked" -- no documentation on the internets seems to indicate you're allowed to only draw CoreGraphics updates to a window in drawRect. This PR works around that by drawing onto a persistent background layer which we then blit to the screen. nn-fullscreen seems to work, as do most common operations. This PR also makes resizing a CoreGraphics view much smoother; the old code was pretty flickery. I haven't dealt with DrawSignDrawType yet; not sure how to trigger that code path. maintainers: am I on the right track here? Any tips? addreses macvim-dev#312 (though not fully, yet).
When you set a borderless style on a subclasses window in 10.12, the original behavior in which you could progressively draw partially on a stale window seems to be gone; it blanks the thing after each draw. It's totally unclear to me whether the CoreText engine as written was ever "correct", or maybe it just "accidentally worked" -- no documentation on the internets seems to indicate you're allowed to only draw CoreGraphics updates to a window in drawRect. This PR works around that by drawing onto a persistent background layer which we then blit to the screen. nn-fullscreen seems to work, as do most common operations. This PR also makes resizing a CoreGraphics view much smoother; the old code was pretty flickery. I haven't dealt with DrawSignDrawType yet; not sure how to trigger that code path. maintainers: am I on the right track here? Any tips? addreses macvim-dev#312 (though not fully, yet).
When you set a borderless style on a subclasses window in 10.12, the original behavior in which you could progressively draw partially on a stale window seems to be gone; it blanks the thing after each draw. It's totally unclear to me whether the CoreText engine as written was ever "correct", or maybe it just "accidentally worked" -- no documentation on the internets seems to indicate you're allowed to only draw CoreGraphics updates to a window in drawRect. This PR works around that by drawing onto a persistent background layer which we then blit to the screen. nn-fullscreen seems to work, as do most common operations. This PR also makes resizing a CoreGraphics view much smoother; the old code was pretty flickery. I haven't dealt with DrawSignDrawType yet; not sure how to trigger that code path. maintainers: am I on the right track here? Any tips? addreses macvim-dev#312 (though not fully, yet).
When you set a borderless style on a subclasses window in 10.12, the original behavior in which you could progressively draw partially on a stale window seems to be gone; it blanks the thing after each draw. It's totally unclear to me whether the CoreText engine as written was ever "correct", or maybe it just "accidentally worked" -- no documentation on the internets seems to indicate you're allowed to only draw CoreGraphics updates to a window in drawRect. This PR works around that by drawing onto a persistent background layer which we then blit to the screen. This PR also makes resizing a CoreGraphics view much smoother; the old code was pretty flickery. addreses macvim-dev#312.
When you set a borderless style on a subclasses window in 10.12, the original behavior in which you could progressively draw partially on a stale window seems to be gone; it blanks the thing after each draw. It's totally unclear to me whether the CoreText engine as written was ever "correct", or maybe it just "accidentally worked" -- no documentation on the internets seems to indicate you're allowed to only draw CoreGraphics updates to a window in drawRect. This PR works around that by drawing onto a persistent background layer which we then blit to the screen. This PR also makes resizing a CoreGraphics view much smoother; the old code was pretty flickery. addreses macvim-dev#312.
can you guys test the master branch? |
It works great for me. Many thanks. |
Binary targets macOS 10.8+ - Vim patch 8.0.0094 - Fixed Non-native fullscreen issue on 10.12 Sierra (#312) Script interfaces have compatibility with these versions - Lua 5.2 - Perl 5.16 - Python2 2.7 - Python3 3.5.2 - Ruby 2.0
Thanks for the fix! Unfortunately, it feels a bit laggy, especially when moving the caret around. It doesn't feel slow in the native full-screen mode though 🤔 So, I think I will be sticking in the native full-screen mode for now. |
Awesome stuff @splhack 👏 ❤️ |
All praise @osheroff! 👏 ❤️ 💃 |
thx guys. @nuc yeah this is doing more computation than before (it currently draws offscreen and then copies the whole layer over), so |
In Snapshot 104 on Sierra 10.12 Beta (16A254g) when I enable "Use Core Text renderer" and disable "Prefer native fullscreen support", all text disappears. Looks like the background color is drawn over everything. Only the current word under cursor periodically appears and disappears as cursor blinks (and triggers redraw?).
Changing one of the options (i.e. running either CoreText + Native full-screen, or non-CoreText + non-native fullscreen) makes everything work fine.
The text was updated successfully, but these errors were encountered: