-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
Question about window borders #8
Comments
The inner radius appears to be zero because of how the radius is calculated, and should appear the same on High Sierra and Mojave. If you look closely at the screenshot in the readme.md it also appears like that.
The border is drawn exactly on (and thus inside) the window, because it annoys me when borders of multiple windows overlap, because they are outside the window-frame. I have made some changes on the master branch that add a small inset to the border frame, and tweaked the radius calculation a bit, such that the inner part of the corner also appear rounded. By doing this, if you have a window_gap of 0, their borders will now partially overlap, as I mentioned above. Can you build from master and let me know if you find this new look to be acceptable? I'm trying to not expose too much in the config, as while it is important to let people customize the behaviour; requiring too much tweaking to get a usable experience is also not good. |
@koekeishiya Confirmed! I didn't restart the home-brew service :-( |
Currently it does not render borders using HiDPI as far as I can tell. I am using private APIs to create the border windows because I want to stay out of objective-c and Cocoa APIs as much as possible. There is likely some setting that is required to enable HiDPI support. I'll look into this more at some point. |
Borders are now drawn with HiDPI. |
Isn't it wrong to assume a 2x resolution? The default for a new MacBook Pro right now is 1680x1050 on a 2880x1800 display, which is not 2x. Also there might be multi-monitor setups using different scaling factors across multiple displays. Maybe there is a way to get the window resolution / scaling factor of the window you're drawing the border on and re-use that factor? |
I suppose in the case of a multi-monitor setup, you are correct. For the built-in / Apple screens I would assume this piece of documentation remain accurate.
From https://developer.apple.com/documentation/appkit/nswindow/1419459-backingscalefactor?language=objc Edge-case: What happens if a window is 50% located on a retina display, and 50% on a non-retina display? |
I disabled retina resolution on my MBP and started borders still work properly, they are just drawn without HiDPI as expected, so I think that is probably a non-issue. There is likely support in the WindowServer that validates that the window can be drawn with HiDPI on the display it is drawn to, and if that display does not support HiDPI, it will fall back to LowDPI. Edit: Also tried to have one display with HiDPI, and one without. Moving a window back and forth properly shows the correct resolution, regardless of which display the border was originally created on. |
@koekeishiya The updated HIDPI borders look awesome! :-) |
This won't be fixable until a window rules system is in place. Currently, all elements on the screen that are reported as windows by macOS will get a border. The fix is to first check if the element is an actual window, but many non-windows report that they are, and many windows report that they aren't (e.g: Emacs among others). |
@koekeishiya Ah, will be looking forwards for the window rules :-) Currently almost migrated to yabai.... 👍 |
This started to annoy me again so on the latest master we adjust the window frame if it has a visible border to accommodate the inset value. |
@koekeishiya What about drawing borders outside if gap > 2 * border-width, Sent with GitHawk |
I'll stick with the current border placement for now. Also made it such that borders are only created for actual windows. Applications that report an incorrect role for their windows will not get a border. Closing this as resolved. |
I'm currently trying yabai in macOS High Sierra. (I adjusted the homebrew formulae and builded it myself)
In my computer, the border's inner radius is always zero, and the border is drawn inside of the window instead of the outside like chunkwm.
As the radius looks like being calculated automatically unlike chunkwm, I have some questions related to macOS versions.
The text was updated successfully, but these errors were encountered: