top | item 46063383

(no title)

bsnnkv | 3 months ago

Took a look at this and it feels like it is implemented using public macOS frameworks so it shouldn't break between macOS updates

My guess is that kAXWindowMovedNotification, kAXWindowResizedNotification, kAXMainWindowChangedNotification etc. are being listened to on the currently focused window using the Accessibility framework, and there is a callback which gets the latest position of the tracked window whenever it is fired, and uses that position as a reference to update the border position

The border window itself is most likely an NSWindow, which is why the tracking of the border with the target window feels quite sluggish

discuss

order

tylerhall|3 months ago

Developer of the app here. You’re correct. Accessibility APIs + timer + transparent top-level NSWindow that ignores input and draws a border.

bsnnkv|3 months ago

Fwiw I think this is the right approach. The trade-off between stability across OS updates vs tracking performance is a no-brainer for me - the absolute last thing that I would want is a deluge of bug reports with no other information than "it stopped working" when Apple pushes out an update

Angostura|3 months ago

Very nice idea, thank you for developing it. With an M1 iMac, though the window border lags the position of the window quite a lot if you drag it around, so probably not usable for me.

inatreecrown2|3 months ago

I thought I take a look at the code, but I can only find readme and license?