Skip to content
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

Border size seems to be off by 1 pixel #753

Closed
sluukkonen opened this issue Dec 10, 2020 · 5 comments
Closed

Border size seems to be off by 1 pixel #753

sluukkonen opened this issue Dec 10, 2020 · 5 comments
Labels
question Request for information or help, not an issue

Comments

@sluukkonen
Copy link

image

Perhaps this is by design, but to my eye, the border rectangle should be one pixel larger.

macOS 11.0.1
yabai 3.3.5

Relevant configuration:

yabai -m config window_border                on
yabai -m config window_border_width          2
yabai -m config active_window_border_color   0xffff0000
yabai -m config normal_window_border_color   0x01000000
@noib3
Copy link

noib3 commented Dec 17, 2020

I agree, the border seems off in my setup too
2020-Dec-17@20:44:23

@koekeishiya
Copy link
Owner

This is not a mistake and the border matches the actual window. What you are seeing is the window shadow.

Shadows on:
Screenshot 2020-12-17 at 22 43 41

Shadows off (yabai -m config window_shadow off):
Screenshot 2020-12-17 at 22 44 10

@koekeishiya koekeishiya added the question Request for information or help, not an issue label Dec 17, 2020
@sluukkonen
Copy link
Author

I suppose this makes sense. Thanks!

@sluukkonen
Copy link
Author

Hmm. Turning off window shadows seems to remove shadows from everywhere in the UI (e.g. menus, spotlight window and so on).

Would it make sense if the window border was drawn over the shadow when shadows are enabled?

@sluukkonen sluukkonen reopened this Dec 22, 2020
@koekeishiya
Copy link
Owner

koekeishiya commented Dec 26, 2020

Different windows can have different shadow parameters (at least they used to before Big Sur), so I think that might be tricky to get right. If you look at my pictures above you will notice that the actual wallpaper is shaded also, outside the 1pixel range of the window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Request for information or help, not an issue
Projects
None yet
Development

No branches or pull requests

3 participants