Reputation: 13
i can to get screens information with: screen.getAllDisplays(), but can not detect when active(where my app is open) display is plugging out
Upvotes: 0
Views: 475
Reputation: 71
Electron have a listener to detect when a display is plugging out, is on the screen module https://www.electronjs.org/es/docs/latest/api/screen#evento-display-removed
you could write something like this
const { screen } = require('electron');
screen.on('display-removed', (event, display) => {
// do something with the display data
});
Upvotes: 1