I am trying to create traffic lights with a custom inset in my Mac app, as it seems like there’s currently no good way of doing so in Electron
In fullscreen mode, I still want to preserve the default traffic lights in the fullscreen titlebar (while hiding my custom ones), so I use
win.setWindowButtonVisibility(true) when the fullscreen button is clicked. Upon exiting fullscreen, I want to once again hide the default traffic lights in the titlebar and show my custom inset ones, so I call
win.setWindowButtonVisibility(false). However, there seems to be a delay when I do this, as I get a quick glimpse of the native traffic lights before they disappear:
My current logic:
Is this a result of
setWindowButtonVisibility(false) being slow? Or am I approaching this incorrectly?