How to get access to other-Space windows

@Andreas_Hegenberg Hello, I found some interesting features that BTT can get access other space windows, that is wonderful. There is an open source project on github called AltTab. We have a lot of discuss in the issue Better trick to get access to other-Space windows to get access other space windows. What I'm curious about is how did you implement this feature? Are you using CG and AX APIs with an invisible helper window to switch to another space window? I had submitted a PR on AltTab. I use CG APIs to get other space windows, but I can't use AX refs to focus windows on other space. So I use an invisible window to go to that space and then focus that window. Thank you in advance for answering these questions and helping us to improve AltTab.

I'm using the stupidest solution possible: I'm figuring out on which space a window is via the (some of them private) CG APIs, then I'm sending the keyboard shortcuts to switch spaces, therefore not needing the AX references to the windows. E.g. if a window is 3 spaces to the right, I'm sending the shortcut to switch to the right space 3 times. I think AltTab has already better solutions for this, but I wanted to keep this as simple as possible without keeping track of AXWindows

Do you only use CG APIs to filter all of the windows(including other space)?
Currently, AltTab only use AX references to filter windows, as a result, it can not get the windows that was in another space before AltTab was launched until users visit that space. So if some apps were launched before AltTab, AltTab will miss some windows on other space. But BTT doesn't have that issue. By the way, I found that BTT also missing some windows like I have 6 IDEA windows on current space, BTT only get 2 of them.
I'm very happy to see that BTT has the new feature to switch windows. I hope it will be more and more perfect :smile:

To retrieve the window lists I'm just using CGWindowListCopyWindowInfo, which I think returns all windows from all spaces. Then I'm filtering out some of the "helper" windows based on some properties like window level and size. Maybe I'm filtering too much for IDEA, I'll have a look! Can you tell what windows you are missing?
Afterwards I'm using CGSCopyWindowsWithOptionsAndTags to figure out which spaces the windows are on and whether they are minimized/hidden or not.

@Andreas_Hegenberg I have 6 projects on split windows, each windows are same size. Here are the snapshots:

BTT only get these two:

Ah yes, seems like the same issues as this: Window Switcher doesn't detect multiple maximized windows of the same application - Bug Reports - BetterTouchTool Community (

I think I might have resolved it with 4.002, which I'm currently uploading.

I just updated to version 4.002, it fixed that issue. Nice! :+1: