I\'ve been trying to move a frameless window on false but now I want to move the whole window just by dragging one element (the title bar), I\'ve tried -w
First create your app window with the frame
option set to false
on your main.js file:
mainWindow = new BrowserWindow({
...
frame: false
})
Then in your renderer.js file create an HTML element (Ex. ) with the -webkit-app-region
propperty set to drag
.
var windowTopBar = document.createElement('div')
windowTopBar.style.width = "100%"
windowTopBar.style.height = "32px"
windowTopBar.style.backgroundColor = "#000"
windowTopBar.style.position = "absolute"
windowTopBar.style.top = windowTopBar.style.left = 0
windowTopBar.style.webkitAppRegion = "drag"
document.body.appendChild(windowTopBar)