-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
Handle minimized windows #11
Comments
Need to remove I tried to implement this today but I keep hitting a wall. Without How to distinguish minimized windows from not-actually-windows? I looked at all attributes of windows from the Not sure how to proceed from here :/ How are similar apps doing?
|
Note this interesting approach to still getting a screenshot of a minimized window. |
This is the best approach I can imagine to implement given the terrible OS APIs:
|
There may a call to the |
would just showing the icon in the thumbnail region suffice? sometimes (specially when i option-click a inactive window because of muscle memory on other system) osx makes some window vanishes to who knows where... the only way to bring up the window again is to either original-alt-tab to the icon, or execute the app again. (there is no icon on the minimized window area or anything else that will work with the suggestions here, even original-alt-tab behaves weird if you press up/down on the icon it will show the desktop instead of the window) |
At the moment the issue lies in the technical implementation. I don't know how to do it. The OS APIs are super messy. For the UX, it's either gonna be no thumbnail just title and app icon, or we keep the thumbnail from before. Or maybe still have a fresh thumbnail using the python trick but i doubt the performance is gonna be good enough to allow for that one |
I though it did? To be clear: what exactly do we call a minimized window? Pressing the yellow And it's thumbnail is updated as anything else (delayed, when you hold CMD-~ and wait). |
Window goes in the dock. There is a setting in Mission Control which if you check makes the windows go in their app's icon instead of next to the trash icon in the dock with their own miniature. I mean it used to. I tried checking it now, and it doesn't change anything. Not sure what happened with this since I haven't used that settings in years
My god you're right. Why would they only show minimized window in that mode? Seems like a bug to me.
I tried a youtube video, and I don't see any update. I think they store the picture right before it's minimized and keep showing it. |
I found this particular problem to be quite interesting, so I wanted to give this a test myself. The function I mentioned earlier does indeed allow you to perform a snapshot of a minimized window. Some sample C code I used to test this (no error checking etc is being performed here, just the minimal amount of code to run a test):
I have not verified which versions of macOS have this function available, but I highly suspect this to work all the way back to macOS El Capitan. Edit: As far as performance go, running the snippet took roughly ~34-38 milliseconds on my machine (i7 2.20GHz 8core CPU). |
@koekeishiya i implemented this private API in #78. It seems to work just fine, with even better performance than the public CG API that was used previously Regarding compatibility, do you know if there are compat tables for different versions of macOS for the private APIs? |
Not that I know about. The only way I can think of to check this would be to get a version of the framework for the macOS version you are wondering about, and then inspect the symbols for that version of macOS. |
simplify calls for kAXWindowsAttribute
I'm wondering for the UX part what to do with the minimized windows since they are not ordered from most-recently-used like the other windows we get from the CG API call. I'm been thinking about different designs: |
Thanks for the visual mocks. I would go for the marker for now since its easier to implement as its just an overlay in every Cell (some flat icon from fontawesome or other possible sources). In the Preferences the user could maybe choose if minimized windows should be orderered in ThumbnailPanel first or last. |
nice work! ...this reminds me when doing anything on windows required documentation from the unofficial "win api" site, because everyone used the proprietary APIs for so long microsoft gave up on making them official Apple have really replaced Microsoft on every front 😬 |
Also closes #11 closes #45 closes #62 BREAKING CHANGE: this brings huge changes to core parts of the codebase. It introduces the use of private APIs that hopefully are should be compatible from macOS 10.12+, but I couldn't test them. I reviewed the whole codebase to clean and improve on performance and readability
Also closes #11 closes #45 closes #62 BREAKING CHANGE: this brings huge changes to core parts of the codebase. It introduces the use of private APIs that hopefully are should be compatible from macOS 10.12+, but I couldn't test them. I reviewed the whole codebase to clean and improve on performance and readability
# [2.0.0](v1.14.4...v2.0.0) (2019-12-27) ### Features * display other spaces/minimized windows (closes [#14](#14)) ([3f5ea25](3f5ea25)), closes [#11](#11) [#45](#45) [#62](#62) ### BREAKING CHANGES * this brings huge changes to core parts of the codebase. It introduces the use of private APIs that hopefully are should be compatible from macOS 10.12+, but I couldn't test them. I reviewed the whole codebase to clean and improve on performance and readability
This ticket and a bunch of others are closed in v2 released today. Feel free to test that new version out and give feedback here! Hopefully you experience better performance, can interact with minimized windows, and interact with windows from other spaces and displays. Cheers! |
It is not possible to display thumbnails for minimized windows, but we could display a message instead.
Listing the minimized windows would be done by removing
.optionOnScreenOnly
inCGWindowListCopyWindowInfo([.excludeDesktopElements], kCGNullWindowID)
The text was updated successfully, but these errors were encountered: