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
MacOS shortcut for app switching sometimes focuses desktop instead of fullscreen window #3659
Comments
Technically it actually seems like macOS thinks Alacritty is focus the point you ended up on the desktop, judging by the menu bar. This is a bug i've never seen before. Does it only occur when you have it full-screened (different space)? |
@casperstorm It seems to always focus alright when I have it on the default desktop space as a windowed app. As far as I know, it only happens when it's as a full-screen space. Also worth noting, on MacOS, when an app is full-screen (most any app you can go to View -> Enter Full Screen), when in that space, you can put your mouse your mouse to the top of the screen and the menubar will pop down allowing you do access the menu items and buttons. Alacritty doesn't do this. The only two ways to get it out of full-screen mode is to open up mission control, hover over the Alacritty space, and click the un-full-screen button that pops up or to use the hotkeys. This isn't an issue for me per se, but it probably detracts from the uniformity of other apps on MacOS. |
It might be interesting to see if this can be reproduced with the examples of winit. There's a fullscreen example that can be executed with |
@chrisduerr I tried doing this for y'all. I don't know anything about the Rust ecosystem, but I stumbled around enough to clone winit and run the command you gave. I get an error |
I've never heard of this. Do you get the same error when trying to |
Same error. Here's some output (cleaned up a bit):
|
@casperstorm Which version of macOS are you running? Have you run into any issues like that yourself. I personally never had any issues. |
Currently running
@thoughtarray: do you have CTL installed ( I'll try to investigate the app switching issue later today. |
I have been experiencing the issue with ⌘-Tab problem for years with the native MacOS Terminal.app and now with Alacritty since I started using it about a week ago. @thoughtarray any chance you are using a multiplexer like tmux or gnu screen? I personally have been using GNU Screen in the Terminal app and now in Alacritty |
@casperstorm I do not have xcode installed. Perhaps that's the undocumented dependency? I've been using Nix for all my dependencies (vs native & Homebrew) thus far. @mliker I have been using tmux. I just tested Cmd-Tab app switching like 500 times this morning. It happens a lot more often when running tmux, but it also happened a few times while not running it. Weirdly enough, it seems to happen much more reliably when Allacritty is in a space to the left of the program that I am hotkey switching to and fro. Perhaps it's some kind of drawing or related timing issue? If I hotkey switch to Allacritty while it's doing operation X, focus will skip over full-screen window to default desktop space? |
If @mliker can reproduce it with Terminal.app, it might be a macOS problem. You say you cannot reproduce it at all with Terminal.app, correct @thoughtarray? |
@chrisduerr I don't usually use Terminal.app, but I'll try it on my system. I'm trying to move from iTerm to Alacritty; so I'll try iTerm as well for this issue. |
@chrisduerr @mliker I could not repro with iTerm or Terminal. All three were running tmux. I issued This is all very nebulous. Perhaps I could capture some kind of detailed logs while doing this? Do I need to download Xcode and clone the Allacritty repo to do this? |
You can get logs from Alacritty without compiling it manually using @mliker Is your issue identical to that described by @thoughtarray? Or is it slightly different? |
@chrisduerr I haven't done such a deep analysis as @thoughtarray however the basic description stands. MacOS would end up on the first desktop after cmd-tab switching from another app (in fullscreen) to Alacritty (also in fullscreen) with Alacritty focused in menu bar. However, as I mentioned this behaviour is not new to me since I have been experiencing the same issue with the Terminal.app for quite some time. I believe it stopped at some point, perhaps two to three major MacOS releases ago but then returned. I will try to capture the conditions during which this happens. |
@chrisduerr I ran I did notice (and might not have noted before) that it only happens with switching between full-screened spaces & not between programs to and fro the desktop. For example, if Firefox is on the default desktop space, switching to and fro won't display the behavior. But if I full-screen Firefox and do the same, the behavior will happen. |
Have you tried Firefox+Firefox both in fullscreen on different spaces for example? |
You can't really do that on MacOS that I know of. You have to switch between programs. If you have one window of a program full-screeened, you can't switch between the two instances. |
I issue the same problem, never happens before with any other apps. Iterm/Kitty/FF/Terminal.app works good. It has the same happen frequency as with regular use as with tmux. My guess that it is somehow connected with #3023 |
@thoughtarray you should be able to do this. For instance, I run two full-screen instances (separate spaces) of alacrity. You can create a new window, send it to a different space and then use the shortcut to go to this other space instead of cmd + tab. P.S.: I also have this focus issue with Alacritty when I switch spaces. |
@bpinto I'm familiar with the cmd arrow shortcuts. chrisdurr was asking me to try to repro with a different program with two instances using cmd + tab which you can't do on MacOS (that I know of). I feel like we've wandered from the original issue. I'm behind at this point though; so I'll download the latest and try again. |
I have exactly the same issue.
I tried with I'm happy to provide more information. |
I have the same problem, I'm on MacOS 10.15.7. |
Another data point, I'm thinking this is coming from winit: For MacOS 10.15.7:
The original report mentions similarity to #1704 (focus lost when switching windows in windowed mode within one space), which I was unable to replicate. Things I tried and gave up on:
Where I'm going from here:
|
I've also been having this issue since 0.5.X was released. Still not resolved in the 0.6.X RC Indeed alacritty seems to be in focus. My keypresses route to it correctly. I think it is related to the cmd key getting stuck #3188 I think its related because they issues both appeared at the same time and when switching if I hit Q at the right time I can get alacritty to quit even though I don't have the cmd key pressed and the focus seems wonky. I've been able to consistently reproduce on multiple macs I've tried. I'm happy to try debugging or provide more details. I think it may be config related. I just tried testing on a laptop that I have 0.4.X on with the old config so when launching the newer versions to test they bomb and revert to defaults and I cannot reproduce. |
I am also running into this on Big Sur (11.0.1, intel) with Alacritty 0.6.0. Thank you @thoughtarray for getting the conversation started, and providing the animation in your original writeup. For my part, I have seen this happen from time to time with other apps in fullscreen mode, but never really often enough to take notice. It is much more frequent with Alacritty. I am happy to provide any tracing, logs, etc that may be helpful. |
Just noticed this as well, which @brennantaylor has also pointed it out: when this issue occurs, Alacritty does still receive keypresses. |
I had the same issue with other Apps. It's gone when I turned off Dock auto-hide and menu bar auto-hide. In the issue description video I see Dock auto-hide enabled too, so it may be related. Hope this could help fix or at least workaround this truly irritating bug. |
I can confirm that enabling the |
I’m still experiencing the bug regardless of the state of that setting. |
No, never mind, I imagine I didn't test things properly, the issue remains, my apologies for the confusion. |
@casperstorm Can we remove the "A - needs repro" label? Plenty of people are experiencing and reproducing this issue. |
I'm starting to suspect it's something to do with alacritty not having any menu items on osx. Eg in fullscreen I can't get it to expose the menu bar at all. I may try hacking in a noop item and see if the issue disappears. Still happening on 0.7.1 and a fresh catalina laptop. Plugged into an external monitor with desktops mirrored. |
For anyone else reading I'm working around the issue by using
|
I had an issue where Alacritty would stay focussed when I switch to my Desktop space instead of giving focus back to the application in the Desktop space. After a lot of time spent debugging, I found out that this was caused by my Alacritty.app being assigned to a space... Switching it back to I don't know if my issue could be related to the issue here. |
The |
Whether autohide is on or off, my condition is the same. If I just cmd-tab back and forth to the only window I have open, it randomly switches to the app or the desktop over and over. It doesn't seem to have a pattern. |
Hi Alacritty team,
I tried my best to find an existing ticket, but perhaps I've the incorrect search terms. This issue seems a lot like #1704.
Issue
If Alacritty is full-screen (MacOS full-screen as in not regular desktop but different space) and when switching between most recent apps using Command-Tab (⌘-Tab) (this is one of the most common hotkey combos in MacOS), Alacritty will sometimes not come into focus. To be more specific, the user view will switch to the normal desktop space and Alacritty will be in the taskbar in "focus", but the Alacritty window will still be in a different space.
It seems to happen pretty randomly too. Sometimes it'll happen seemingly more often than not. I was trying to record a video of the behavior and it seemed to want to function as expected. When I'm working, seems to happen 1 out of 4 switches.
System
OS: MacOS 10.15.4
Version: 0.4.2 (dmg downloaded from Github release based on f68de37)
Logs
Don't know how to get these since it wasn't a CLI download/package. Would love to assist in any way with advice.
The text was updated successfully, but these errors were encountered: