Skip to content
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

WIP: Fix problems with non-native fullscreen and mac 10.12 #58

Closed
wants to merge 7,806 commits into from
Closed

WIP: Fix problems with non-native fullscreen and mac 10.12 #58

wants to merge 7,806 commits into from

Conversation

osheroff
Copy link

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 works around it by drawing onto a background layer as soon as we receive the event from the vim backend, and then simply copying the layer out to the window in drawRect.

nn-fullscreen seems to work, as do most common operations. resizing is
still wonky/ugly (any tips here appreciated; not sure quite what I'll do), and I haven't dealt with DrawSignDrawType yet.

maintainers: am I on the right track here? Any tips?

addreses #312 (though not fully, yet).

brammool and others added 30 commits September 3, 2016 16:43
Problem:    Crash when deleting an augroup and listing an autocommand.
            (Dominique Pelle)
Solution:   Make sure deleted_augroup is valid.
Problem:    No error when deleting an augroup while it's the current one.
Solution:   Disallow deleting an augroup when it's the current one.
Problem:    Insufficient testing for Normal mode commands.
Solution:   Add a big test. (Christian Brabandt, closes #1029)
Problem:    Channel sort test is flaky.
Solution:   Add a check the output has been read.
Problem:    Normal mode tests fail on MS-Windows.
Solution:   Do some tests only on Unix.  Set 'fileformat' to "unix".
Problem:    When 'incsearch' is not set CTRL-T and CTRL-G are not inserted as
            before.
Solution:   Move #ifdef and don't use goto.
Problem:    No way for a system wide vimrc to stop loading defaults.vim.
            (Christian Hesse)
Solution:   Bail out of defaults.vim if skip_defaults_vim was set.
Problem:    Redraw problem when using 'incsearch'.
Solution:   Save the current view when deleting characters. (Christian
            Brabandt) Fix that the '" mark is set in the wrong position. Don't
            change the search start when using BS.
Problem:    When a test is commented out we forget about it.
Solution:   Let a test throw an exception with "Skipped" and list skipped test
            functions. (Christian Brabandt)
Problem:    Access memory beyond the end of the line. (Dominique Pelle)
Solution:   Adjust the cursor column.
Problem:    Using freed memory when using 'formatexpr'. (Dominique Pelle)
Solution:   Make a copy of 'formatexpr' before evaluating it.
Problem:    Crash when editing a new buffer and BufUnload autocommand wipes
            out the new buffer. (Norio Takagi)
Solution:   Don't allow wiping out this buffer. (partly by Hirohito Higashi)
            Move old style test13 into test_autocmd. Avoid ml_get error when
            editing a file.
Problem:    Tiny build fails.
Solution:   Add #ifdef.
Problem:    Illegal memory access when Visual selection starts in invalid
            position. (Dominique Pelle)
Solution:   Correct position when needed.
Problem:    Freeing a variable that is on the stack.
Solution:   Don't free res_tv or err_tv. (Ozaki Kiichi)
Problem:    Crash when BufWinLeave autocmd goes to another tab page. (Hirohito
            Higashi)
Solution:   Make close_buffer() go back to the right window.
Problem:    Error for min() and max() contains %s. (Nikolay Pavlov)
Solution:   Pass the function name. (closes #1040)
Problem:    Coverity complains about not checking curwin to be NULL.
Solution:   Use firstwin to avoid the warning.
Problem:    Using CTRL-X CTRL-V to complete a command line from Insert mode
            does not work after entering an expression on the command line.
Solution:   Don't use "ccline" when not actually using a command line. (test
            by Hirohito Higashi)
Problem:    Crash when stop_timer() is called in a callback of a callback.
            Vim hangs when the timer callback uses too much time.
Solution:   Set tr_id to -1 when a timer is to be deleted. Don't keep calling
            callbacks forever. (Ozaki Kiichi)
Problem:    Outdated comments in test.
Solution:   Cleanup normal mode test. (Christian Brabandt)
Problem:    On MS-Windows test_getcwd leaves Xtopdir behind.
Solution:   Set 'noswapfile'. (Michael Soyka)
The macthinstrokes option renders the text a
little lighter which looks nice when using a dark
colorscheme and a retina display.
Problem:    taglist() is slow. (Luc Hermitte)
Solution:   Check for CTRL-C less often when doing a linear search. (closes
            #1044)
Problem:    Running normal mode tests leave a couple of files behind.
            (Yegappan Lakshmanan)
Solution:   Delete the files. (Christian Brabandt)
Problem:    taglist() is still slow. (Luc Hermitte)
Solution:   Check for CTRL-C less often when finding duplicates.
brammool and others added 29 commits November 6, 2016 14:17
Problem:    VMS has a problem with infinity.
Solution:   Avoid an overflow. (Zoltan Arpadffy)
Problem:    Checking did_throw after executing autocommands is wrong. (Daniel
            Hahler)
Solution:   Call aborting() instead, and only when autocommands were executed.
Problem:    Compiler warning for self-comparison.
Solution:   Define ONE_WINDOW and add #ifdef.
Problem:    Tests referred in Makefile that no longer exist.
Solution:   Remove test71 and test74 entries. (Michael Soyka)
Problem:    Exit value from a shell command is wrong. (Hexchain Tong)
Solution:   Do not check for ended jobs while waiting for a shell command.
            (ichizok, closes #1196)
Problem:    MS-Windows: Crash with long font name. (Henry Hu)
Solution:   Fix comparing with LF_FACESIZE. (Ken Takata, closes #1243)
Problem:    More comparisons between firstwin and lastwin.
Solution:   Use ONE_WINDOW for consistency. (Hirohito Higashi)
Problem:    Cannot make Vim fail on an internal error.
Solution:   Add IEMSG() and IEMSG2(). (Domenique Pelle)  Avoid reporting an
            internal error without mentioning where.
Problem:    Using number for exception type lacks type checking.
Solution:   Use an enum.
Problem:    Channel log has double parens ()().
Solution:   Remove () for write_buf_line. (Yasuhiro Matsumoto)
Problem:    The GUI code is not tested by Travis.
Solution:   Install the virtual framebuffer.
Problem:    Accessing freed memory in quickfix.
Solution:   Reset pointer when freeing 'errorformat'. (Domenique Pelle)
Problem:    Accessing freed memory in quickfix. (Domenique Pelle)
Solution:   Do not free the current list when adding to it.
Problem:    The OS X build fails on Travis.
Solution:   Skip the virtual framebuffer on OS X.
Problem:    Inconsistent function names.
Solution:   Rename do_cscope to ex_cscope.  Clean up comments.
Problem:    Extension for configure should be ".ac".
Solution:   Rename configure.in to configure.ac. (James McCoy, closes #1173)
MacVim should report FocusGained and FocusLost events not just when its
windows become main, but when they become key -- if a panel is opened,
or a background application (i.e. an LSUIElement app) becomes active,
MacVim should reflect the focus state.
Report focus change on window key (not main)
Problem:    Using freed memory with win_getid(). (Domenique Pelle)
Solution:   For the current tab use curwin.
Problem:    Using freed memory when adding to a quickfix list. (Domenique
            Pelle)
Solution:   Clear the directory name.
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 #312 (though not fully, yet).
@osheroff osheroff closed this Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants