🐛 Fix: mini window drag bug

This commit is contained in:
PiEgg
2022-01-05 12:18:50 +08:00
parent ea20d3b971
commit 34b3656605
4 changed files with 23 additions and 5 deletions

View File

@@ -26,7 +26,8 @@ import {
OPEN_USER_STORE_FILE,
OPEN_URL,
RELOAD_APP,
SHOW_PLUGIN_PAGE_MENU
SHOW_PLUGIN_PAGE_MENU,
SET_MINI_WINDOW_POS
} from '#/events/constants'
import {
uploadClipboardFiles,
@@ -212,6 +213,10 @@ export default {
app.relaunch()
app.exit(0)
})
ipcMain.on(SET_MINI_WINDOW_POS, (evt: IpcMainEvent, pos: IMiniWindowPos) => {
const window = BrowserWindow.getFocusedWindow()
window?.setBounds(pos)
})
},
dispose () {}
}