macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.51k stars 684 forks source link

Catalina 10.15.1, MacVim 8.1.2234 full screen before sleep, full screen is broken on wake #996

Open robacarp opened 4 years ago

robacarp commented 4 years ago

Describe the bug

After waking the computer up, MacVim which used to be full screen is no longer full screen. The "full screen window" where MacVim is supposed to live is still there, but the MacVim window itself is not full screen, and exists on a Desktop "window". I'm not sure of the correct term here, but by "window" I mean the full screen switcher which appears at the top of the screen when in what used to be called expose mode.

The MacVim window is mostly unresponsive -- keypresses do not have any visible affect, and clicking the window doesn't either. When using the macOS application switcher, the "full screen window" is activated when attempting to switch to MacVim, but the screen is black.

If only one MacVim window is open, sometimes the green full-screen button works and will put the window back. Sometimes not. I believe that when multiple windows are open, the green full screen button never works.

Often the only way to get back to a working application is to force quit macvim.

If the terminal with which I launched MacVim is still open, a message like this is printed:

2019-12-23 05:57:59.389 MacVim[10882:9934680] not in fullscreen state

To Reproduce

This is a bit of a head scratcher for me, but I believe I'm able to reproduce it intermittently in this way. I see this bug several times a week, but it is not consistent.

Expected behavior

The application should not lose it's full screen status.

Screenshots

I will attempt to take a concise screen recording next time I see the problem.

Environment:

I cannot see how it would matter, but my vim config is on github as is my list of plugins

ychin commented 4 years ago

Hi @robacarp did you only see this after updating to Catalina? I haven’t updated myself yet but if you confirm that’s the case it will be a little easier for me to isolate and test the issue.

robacarp commented 4 years ago

@ychin correct, I did not see the error before updating to Catalina.

eirnym commented 4 years ago

I tested MacVim as following and couldn't reproduce the issue:

open mvim -gf --clean as fullscreen, selected other application and nothing has happened with it in 20 hours of sleep.

I'll test with the same conditions over night, but left MacVim selected

UPDATE: and nothing had happened for me.

eirnym commented 4 years ago

@robacarp Could I ask you to do a clean install of plugins, just for a test

robacarp commented 4 years ago

@eirnym I will do that, yes.

Here is a screencast with both keyboard and mouse annotations that shows some of the behavior I'm talking about. In this case, I wasn't paying attention and closed the vim window which had been de-full-screened, but opening a new window shows essentially similar behavior. I was able to open a window with the terminal command mvim, but as you can see in the video the menubar is unresponsive as well as the entire window (except for being dragable).

The cursor annotation software I used apparently doesn't correctly support full screen apps, and didn't show cursor clicks while I was in the MacVim full screen pane, but there are plenty of clicks which do nothing.

eirnym commented 4 years ago

I see, this behavior should be fixed, I don't know any reason, though

I'm sorry, I've forgot to ask you for your MacVim's settings which are not stored in .vimrc file.

robacarp commented 4 years ago

@eirnym I'm not positive what you're asking for, but here are a few screenshots. If this isn't what you need, let me know.

image

image

ychin commented 4 years ago

@robacarp Do you mind including your settings by doing the steps listed in https://github.com/macvim-dev/macvim/wiki/Reporting-an-Issue and run the following in the terminal?

defaults read org.vim.MacVim | grep 'MM\|SU'
robacarp commented 4 years ago

@ychin sure, no problem. Thank you for letting me know.

> defaults read org.vim.MacVim | grep 'MM\|SU'
    MMAutosaveColumns = 159;
    MMAutosaveRows = 50;
    MMCurrentPreferencePane = Advanced;
    MMTopLeftPoint = "{0, 1180}";
    "NSWindow Frame SUUpdateAlert" = "650 588 620 392 0 0 1920 1177 ";
    SUEnableAutomaticChecks = 1;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2019-12-31 13:43:41 +0000";
    SUSendProfileInfo = 0;
    SUUpdateGroupIdentifier = 127417142;
    SUUpdateRelaunchingMarker = 0;
robacarp commented 4 years ago

I realized this morning that my touch bar has a pending question on it. I don't know the text of the question, but it's the one where a file has changed and vim wants to know if it should load the file from disk or not. I was able to see the response buttons on my touch bar, but the popup modal was nowhere to be found.

I don't typically have my laptop open so the touch bar isn't visible / available, so it was a serendipitous moment to see it.

robacarp commented 4 years ago

I’m experiencing similar issue with another app, Alfred. They’re describing the issue slightly differently but I think the root cause is likely the same. https://www.alfredforum.com/topic/14110-alfred-406-toggle-breaks-on-catalina/