2018-07-11 16:46:27 +00:00
|
|
|
#import "GBBorderView.h"
|
|
|
|
|
|
|
|
@implementation GBBorderView
|
|
|
|
|
|
|
|
|
|
|
|
- (void)awakeFromNib
|
|
|
|
{
|
2021-10-23 10:36:58 +00:00
|
|
|
self.wantsLayer = true;
|
2018-07-11 16:46:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (BOOL)wantsUpdateLayer
|
|
|
|
{
|
2021-10-23 10:36:58 +00:00
|
|
|
return true;
|
2018-07-11 16:46:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)updateLayer
|
|
|
|
{
|
|
|
|
/* Wonderful, wonderful windowserver(?) bug. Using 0,0,0 here would cause it to render garbage
|
|
|
|
on fullscreen windows on some High Sierra machines. Any other value, including the one used
|
|
|
|
here (which is rendered exactly the same due to rounding) works around this bug. */
|
|
|
|
self.layer.backgroundColor = [NSColor colorWithCalibratedRed:0
|
|
|
|
green:0
|
|
|
|
blue:1.0 / 1024.0
|
|
|
|
alpha:1.0].CGColor;
|
|
|
|
}
|
|
|
|
@end
|