diff --git a/makefile b/makefile index ec2a995..bf92833 100644 --- a/makefile +++ b/makefile @@ -4,7 +4,7 @@ LIBS = -framework AppKit -F/System/Library/PrivateFrameworks/ -framework SkyLigh all: | bin clang -std=c99 -O3 -g $(FILES) -o bin/borders $(LIBS) -debug: +debug: | bin clang -std=c99 -O0 -g -DDEBUG $(FILES) -o bin/debug $(LIBS) bin: diff --git a/src/border.c b/src/border.c index 7782e3e..3ce1be6 100644 --- a/src/border.c +++ b/src/border.c @@ -50,8 +50,9 @@ void border_draw(struct border* border) { -g_settings.border_width, -g_settings.border_width ); - if (frame.size.width < 2.f * inner_border_radius - || frame.size.height < 2.f * inner_border_radius) { + CGRect smallest_rect = CGRectInset(window_frame, 1.0, 1.0); + if (smallest_rect.size.width < 2.f * inner_border_radius + || smallest_rect.size.height < 2.f * inner_border_radius) { return; }