mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 22:39:36 +08:00
fix: transparent window flashing when show (#6755)
* fix: avoid SelectionAssistant toolbar flashing * add comments
This commit is contained in:
parent
a4aab3fd4e
commit
345c4f096e
@ -6,7 +6,7 @@ import { app } from 'electron'
|
|||||||
import installExtension, { REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS } from 'electron-devtools-installer'
|
import installExtension, { REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS } from 'electron-devtools-installer'
|
||||||
import Logger from 'electron-log'
|
import Logger from 'electron-log'
|
||||||
|
|
||||||
import { isDev } from './constant'
|
import { isDev, isWin } from './constant'
|
||||||
import { registerIpc } from './ipc'
|
import { registerIpc } from './ipc'
|
||||||
import { configManager } from './services/ConfigManager'
|
import { configManager } from './services/ConfigManager'
|
||||||
import mcpService from './services/MCPService'
|
import mcpService from './services/MCPService'
|
||||||
@ -24,6 +24,16 @@ import { setUserDataDir } from './utils/file'
|
|||||||
|
|
||||||
Logger.initialize()
|
Logger.initialize()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable chromium's window animations
|
||||||
|
* main purpose for this is to avoid the transparent window flashing when it is shown
|
||||||
|
* (especially on Windows for SelectionAssistant Toolbar)
|
||||||
|
* Know Issue: https://github.com/electron/electron/issues/12130#issuecomment-627198990
|
||||||
|
*/
|
||||||
|
if (isWin) {
|
||||||
|
app.commandLine.appendSwitch('wm-window-animations-disabled')
|
||||||
|
}
|
||||||
|
|
||||||
// in production mode, handle uncaught exception and unhandled rejection globally
|
// in production mode, handle uncaught exception and unhandled rejection globally
|
||||||
if (!isDev) {
|
if (!isDev) {
|
||||||
// handle uncaught exception
|
// handle uncaught exception
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user