mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-04 18:39:54 +00:00
parent
9d7bf2ae44
commit
3c74b8ec38
13
app/main.js
13
app/main.js
@ -75,20 +75,7 @@ setupWindowManagement = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
electron.ipcMain.on('window-set-bounds', (event, bounds) => {
|
electron.ipcMain.on('window-set-bounds', (event, bounds) => {
|
||||||
let actualBounds = app.window.getBounds()
|
|
||||||
actualBounds.width -= bounds.x - actualBounds.x
|
|
||||||
actualBounds.height -= bounds.y - actualBounds.y
|
|
||||||
actualBounds.x = bounds.x
|
|
||||||
actualBounds.y = bounds.y
|
|
||||||
app.window.setBounds(actualBounds)
|
|
||||||
setTimeout(() => {
|
|
||||||
actualBounds = app.window.getBounds()
|
|
||||||
bounds.width += bounds.x - actualBounds.x
|
|
||||||
bounds.height += bounds.y - actualBounds.y
|
|
||||||
bounds.x = actualBounds.x
|
|
||||||
bounds.y = actualBounds.y
|
|
||||||
app.window.setBounds(bounds)
|
app.window.setBounds(bounds)
|
||||||
}, 100)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
electron.ipcMain.on('window-set-always-on-top', (event, flag) => {
|
electron.ipcMain.on('window-set-always-on-top', (event, flag) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user