How do I track dragging of a BrowserWindow?



I have an instance of a BrowserWindow. I would like to know when the window is being dragged/moved on the screen.

I have tried using the moved event but that event only gets fired after the window has been moved. It does not fire while the window is being dragged.

How do I track when the window is being tracked?


Try the move event.


move / moved are the same as per the doc.


Sorry. I missed that you were talking about macOS. In that case you might be better off opening a feature request on Electron to get an equivalent event added.

On GNU/Linux (and I think Windows) the move event behaves as you desire.