Comments (19)
Borders are now drawn with HiDPI.
from yabai.
Hm, I'm having an issue where if I click in a window after activating it, the MacOS border takes over the z-index of the Yabai border and makes it look weird, any ideas?
Active window after clicking inside of it:
Edit: Latest Catalina by the way.
from yabai.
See my reply in #310
from yabai.
Is the inner radius being zero because I'm High Sierra, or does it work the same as Mojave?̊̈
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.
Is it expected for the border to be drawn inside of the window or is it not working in High Sierra?̊̈
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.
from yabai.
Hmm... rebuilt yabai from HEAD, but is still seeing the same thing as before :-(
Inner radius is still zero, and borders are still drawn inside:
from yabai.
Hmm weird, maybe there is a difference between systems then, or your build didn't update properly.
This is how it looks for me now:
from yabai.
@koekeishiya Confirmed! I didn't restart the home-brew service :-(
Looks much better now..., but I get the feeling that the borders are pixelated...
It doesn't feel right in retina displays... IMHO
from yabai.
but I get the feeling that the borders are pixelated...
It doesn't feel right in retina displays... IMHO
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.
from yabai.
I'll look into this more at some point.
Great... Looking forward :-)
BTW, it looks like the updated code for borders cause borders appear everywhere!
from yabai.
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?
from yabai.
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.
The value of this property is 2.0 for high-resolution scaled display modes, and 1.0 for all other cases.
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?
from yabai.
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.
from yabai.
@koekeishiya The updated HIDPI borders look awesome! :-)
The only thing blocking me turning on borders is the (new?) bug about displaying borders everywhere :-(
from yabai.
bug about displaying borders everywhere
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).
from yabai.
@koekeishiya Ah, will be looking forwards for the window rules :-)
About the window rules, I decided to go to emacs-mac which has a better macOS GUI support :-)
Currently almost migrated to yabai.... 👍
from yabai.
By doing this, if you have a window_gap of 0, their borders will now partially overlap, as I mentioned above.
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.
from yabai.
@koekeishiya What about drawing borders outside if gap > 2 * border-width,
on the borders (like the master before b4f9d32) if 2 * border-width > gap > border-width
and inside if gap <= border-width?
Sent with GitHawk
from yabai.
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.
from yabai.
See my reply in #310
Thank you!
from yabai.
Related Issues (20)
- Hiding stacked windows for transparency
- `alt-tab : yabai -m space --focus recent` not working HOT 3
- Webex Meetings window not managed by Yabai
- yabai -m window --space 1 does not work on Mac OS 14.5 Sonoma HOT 5
- Yabai with SIP causes crash when logging out
- Showing Dock on empty screen triggers click
- Yabai not handling kitty's windows
- Floating windows moved to a different display have bad frame position ("x" and "y" coordinates) HOT 2
- Please help HOT 1
- Can't move app windows to other workspaces HOT 2
- move window to different space starts to behvae wierd after installing scripting additions HOT 8
- sudo: sorry, you are not allowed to set the following environment variables: TERMINFO HOT 1
- dragging windows with modifier+mouse across displays sometimes leaves an invisible node behind
- Rule to send window to left or right HOT 1
- mouse autoraise stop working
- command to disable mouse modifier?
- Glitches while toggling macOS dock via osascript HOT 1
- Send window and follow focus using space label HOT 1
- Move across spaces without system integrity disabled? HOT 3
- Window that is not managed gets partitioned on yabai restart HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yabai.