macvim icon indicating copy to clipboard operation
macvim copied to clipboard

New window created from fullscreen doesn't get focus

Open RhvdG opened this issue 3 years ago • 7 comments

Steps to reproduce

  1. Run MacVim fullscreen
  2. Hit cmd-N to create a new window (this is created as a fullscreen 'space')
  3. Type something
  4. Notice that what was typed ended up on the first fullscreen window (now not visible), not the new one that should have focus

Expected behaviour

The newly created window (fullscreen) should get focus.

Version of Vim and architecture

8.2, x86_64, patches: 1-3455

Environment

macOS 12.3.1

How MacVim was installed

Homebrew (I think...)

Logs and stack traces

No response

Vim configuration where issue is reproducable

No response

Issue has been tested with given configuration

  • [X] by running MacVim.app from GUI macOS interface
  • [ ] by running vim/gvim/etc installed by MacVim
  • [ ] by running other versions of vim (e.g. /usr/bin/vim)

Issue has been tested with no configuration

  • [ ] by running mvim --clean (or gvim, supplied by MacVim distribution)
  • [ ] by running vim --clean (in terminal, supplied by MacVim distribution)
  • [ ] by running vim --clean (in terminal, other suppliers, e.g. /usr/bin/vim)

Other conditions

  • [ ] The both Homebrew packages "vim" and "macvim" are installed

RhvdG avatar May 27 '22 07:05 RhvdG

+1

dantezhu avatar Jun 14 '22 14:06 dantezhu

That's weird, I'm not reproducing this. Does it matter if you wait a bit or immediately start typing when the animation is ongoing (it takes like less than a second to finish the animation)? Also, are you on a multiple monitors or single-screen environment? macOS does have some funky behavior with focus when on multi-screen so trying to figure out if that could be related.

ychin avatar Jul 27 '22 00:07 ychin

I see similar behavior with a multi-monitor setup.

With an existing MacVim window on screen 1, run MacVim via a terminal window on screen 2. The new window opens on screen 2, but focus is given to the MacVim window on screen 1.

jtiee avatar Mar 10 '23 21:03 jtiee

@jtiee I can see your issue. That said, I'm debating if that's "as designed" per se, because if you look at how other apps work it's actually kind of how they usually behave (e.g. try to do the same with TextEdit or a web browser by right clicking on the dock icon to open a new window on the second screen while the first screen has a full-screen app), but I do agree it's jarring.

I think what you are describing is a little different from the original issue though. I still have not seen a second full screen not being able to focus like that. If the original posters @dantezhu and @RhvdG could post a screen capture video I would appreciate it.

ychin avatar Mar 23 '23 09:03 ychin

Hmm actually I think I may have misunderstood what you said. You aren't talking about full-screen window but just regular windows. Let me take a look.

ychin avatar Mar 26 '23 01:03 ychin

Yes, my note is about the "focus" and not the "full screen" aspect of this issue. Let me know if you'd prefer a separate issue for this.

jtiee avatar Apr 13 '23 18:04 jtiee

Yes, my note is about the "focus" and not the "full screen" aspect of this issue. Let me know if you'd prefer a separate issue for this.

Yes I think that's a different issue. Feel free to file it, but I'm not sure if I would do anything on it for now. It's kind of "as designed" depending on how we think about how macOS apps work, but I agree it's a little annoying.

ychin avatar Apr 15 '23 07:04 ychin