I noticed that in macOS’s dark mode, a window without a visible title bar won’t draw a light border. It will draw a dark/black border, unlike all the other windows, and thus be a lot less visible than it needs to be. So for a floating helper window, I had to make the title bar visible, and then hide all traffic light buttons in the window’s top-left corner:
Continue reading …
People in Slack asked me why I didn’t use another mechanism to get notified when NSWindow
s are shown. Here’s what I was suggested and what I found: NSWindow.didChangeScreenNotification
:
Does not fire for all windows showing for the first time, and if it fires, if firest only once. Closing and re-showing the window will not trigger the notification again.
Continue reading …
How do you observe for changes to the list of visible/known/active NSWindow
instances in your app? There’s NSWindow.willCloseNotification, but there’s no equivalent like a willShowNotification
or didShowNotification
(except for NSPopover
). I don’t know why, but I do find it strange.
Continue reading …