-
Notifications
You must be signed in to change notification settings - Fork 194
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
feat: hide and show windows via cloaking from COM lib #792
Conversation
Draft, looking into having the cloaking functionality to be toggled in the config, allowing users to switch between cloaking and the previously used methods. |
Previous method of hiding the windows (SW_HIDE and SWP_HIDEWINDOW) would completely remove the window from the taskbar, which would lead to unexpected behavior for some people. set_cloak allows the hidden windows to still be present in the task bar. Other discussions on the topic: Ciantic/AltTabAccessor#1
@rpop0 I've been running this branch this morning and it also seems to #250, thank you so much! I also haven't run into #759 yet using this version so it might have fixed it. Edit: I'm very sure #250 and #759 are fixed by this change - I haven't seen a single issue with an electron app or Excel all day! |
Can we do this on a per-application basis? I suspect we will find that some applications (like Excel) only work with this method whereas others work better with the original. I'm finding that MS Outlook doesn't have well with this method. Correctly belongs to a workspace but it won't tile, it's always full screen, even covering the zebar no matter what else I put in the same workspace. |
Hm, from what I quickly tested now it seems like Outlook just crashes the window manager when being started, leading to it not tiling. I'll investigate it and see why that happens. |
You're quite right, it does indeed. I already had outlook open when I started glaze which led to the behaviour I saw. |
@rmanthorpe I think I may have found a fix. Can you try adding the following rules under the ignore command and see if the crash still happens?
|
It still crashes I'm afraid. What I'm seeing (with or without that rule) is that opening outlook with glaze running crashes glaze but starting glaze with outlook running is fine and outlook is working perfectly normally. I'm not sure what happened the first couple of times where outlook wouldn't tile, I can't reproduce that behaviour now! |
So the ignore rules I provided above fix another crash, related to the login screen which MS uses for their apps (Login popup to sign in to Microsoft) I think I narrowed down the issue to the splash screen shown when loading Outlook. WinLister also happens to crash when starting outlook. Try adding the following rule to ignore, separate from the previous rules: |
Yes! That has done the trick! This change is amazing is has had such a big impact on me today. I'm going to keep using this branch until it is merged. |
One common source for crashes when using the COM library cloaking is the get_view_for_hwnd function from IApplicationViewCollection. For a lot of windows, getting a view is not possible (Outlook splash screen, OneDrive quit screen, etc). In the situations where the view can't be acquired, windows are essentially ignored.
@rmanthorpe The most recent commit should make the window manager more resistant to windows with weird behavior that would previously crash. While the rules I specified are longer really needed, they still provide a nicer experience by just ignoring those problematic windows. |
Tested and confirmed - removed the config and Outlook is working well without it! |
Any questions about this pr merge? I think he's doing a really good job. |
I've been running this branch (rebased onto master) for over two weeks now. It fixes several problems for me and I've had no issues since the outlook problem was fixed. I'd love to see it get over the line - what steps are necessary to get there? |
I just didn't get the chance to work on it more, but i've been using it for this time too with no issues. Mainly what needs to be done more is a config option to toggle between this cloaking minimization and the previous method of doing it. I'll try to find the time to get it done this weekend |
🎉 This PR is included in version 3.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Previous method of hiding the windows (SW_HIDE and SWP_HIDEWINDOW) would completely remove the window from the taskbar, which would lead to unexpected behavior for some people. set_cloak allows the hidden windows to still be present in the task bar.
Other discussions on the topic: Ciantic/AltTabAccessor#1
This PR also would close #416