-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Having scroll bar, and Finder tabs being reported as separate windows #256
Comments
Hey @ngocphamm :)
Regarding the fact that there are 4 columns. This is a bug. It should be between 5 and 10 per your preferences. I was able to reproduce locally. It's happening because all your windows are fullscreen, which means the thumbnails have maximal width, and I'm guessing there is a rounding issue where the layout algo is not managing to feat the 5th thumbnail on the first row because it's overflowing by 1 pixel or something. I can see that as soon as I reduce the width of one of the window a little bit suddently there are 5 thumbnails on the first row. I'll check and try to fix this issue. Btw the layout code was a nightmare to write because of all the complex corner-cases with tall/wide windows, and the flexibility of all the sliders interacting with each other. If you wanna dig in and rewrite the logic, feel free hehe ;p
This is actually the way macOS works at a technical levels: if you build you app using the built-in tab system, it will combine windows into tabs. Try drag-and-dropping a Finder/Terminal window by grabbing their tab bar. You will see them morph and when you drop, join the tabs of the other windows. They still stay 2 I don't think there is any way (at list without using private APIs) for us to know that windows are part of a group tabbed together. It's an interesting topic actually. I think some people would want AltTab to show tabs separately, and some would want to see only 1 which holds all tabs. I'll open another dedicated ticket to discuss this. It's interesting. Note that we could never "break down" the tabs of an app using custom tabs, like Chrome. Chrome is making their own tabs using custom UI within 1 window. At least the other way around may be possible by grouping standard tabs within the main window holding the tabs. |
Hey @lwouis. Thanks for the quick response as always! I see "issues" now and I understand that it's not something totally easy to fix so I'm just glad we are aware of the situation. These are totall not a big deal at all. For the rows one, I was under the impression that because I don't have 3*10 yet(3 rows, max 10 windows per row), I shouldn't see the 4th row, and the scrollbar, but I think what you said make sense. The only thing now is that the scrollbar doesn't seem to be scrollable using the scrollwheel of my mouse. It's fine with the 2-finger scroll gesture using the laptop's trackpad, though. 🤔 And I'm not familiar with Swift at all, but I will try to see if I can dig into the logic of calculating thumbnail width there. No promise though because I'm also not good at math 😅 For the Finder tabs issue, what caught my attention was that I have more than 2 tabs and only 2 get showed, so it's a little weird. I also tried to focus on another tab, and the 2 original tabs are still showed. However, as you said, it's probably some limitation we have to cope with for now because of the way those tabs/windows are managed from the lower level. Anyway, thanks for taking your time to look into those concerns of mine. I really appreciate your great work! |
Could you open a separate ticket for this? I'm intrigued as I never tested with a mouse indeed. Since confinement started I've been stuck home with the trackpad.
Actually I remember now. If you start AltTab after you already have the tabbed-together-windows, it will show 1, but if you start AltTab then make 2 windows and tab them together, then you see 2. I think it's because the accessibility API returns only 1 window if you ask for the app windows, but since we asked earlier and there were 2, we still have them, and we never get an event when they get merged. This is great new, it means we have a clear path if we want to implement "show tabs as 1 windows" in #258! :) |
Will make another ticket for scrollbar not scrollable with mouse issue. However, now I realized that shouldn't it try to show me from 5 to 10 windows per row, for 3 rows, before showing the 4th row? Here I definitely don't have 30 windows yet to fill up all 3 rows with my current settings for number of windows per row, and number of rows to show. 🤔 |
Good news, I found the "rounding error" in the layout code. It was indeed a by-5-pixel calculation issue. I'll push the fix soon (with other tickets; I don't want to spam users with updates).
I think the wording Thumbnails have fixed height. This height depends on 2 values: Now for the thumbnails width, it's more complex because within that fixed 20px height, we need to find a width that shows tall and wide windows nicely. Imagine you have a window which is 10px high but 1000px wide. Or vice-versa. We have to decide a limit for these. We can't show a thumbnail that's suuuuper wide, and takes up a whole row. Windows 10 is kind of lacking imo on that. When I studied how they do it, I notice they stretch the thumbnail quite a lot, which I disagree with. Another issue is that for very tall and thin thumbnail, we would not show much of the title, which is important. You want to have some kind of minimum width for tall windows, so there is some text readable by the user. So there is a minimum width so the text is readable with tall thumbnails, and a maximum width so the wide thumbnails don't take up too much horizontal space. This is why there are 2 settings for I hope this explanation helps. It took me 2 iterations over v2 and v3 to come up with this design which I think deals smartly with all the possible cases. |
I think I start to understand this now. So the I think you are doing a really good job on that! Thank you! |
There are 2 separated potential issues I see, captured within this one screenshot
The text was updated successfully, but these errors were encountered: