Skip to content

Commit

Permalink
Fix fullscreen game focus being stolen, again
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed Nov 24, 2024
1 parent 6740399 commit 657101e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -2350,7 +2350,7 @@ ipcMain.on('save-report', async () => {
let panelState = "hidden"
let panelReady = false

function createPanel(toggleOnLoad = false, isRefreshing = false) {
function createPanel(toggleOnLoad = false, isRefreshing = false, showOnLoad = true) {

console.log("Creating panel...")

Expand Down Expand Up @@ -2414,7 +2414,7 @@ function createPanel(toggleOnLoad = false, isRefreshing = false) {
console.log("Panel ready!")
createTray()

showPanel(false)
if(showOnLoad) showPanel(false);

setTimeout(() => {
if(!mainWindow) return false;
Expand Down Expand Up @@ -2579,11 +2579,11 @@ function restartPanel(show = false) {
if (mainWindow) {
mainWindow.setBounds({ x: 0, y: 0, width: 0, height: 0 })
mainWindow.setOpacity(1)
mainWindow.restore()
//mainWindow.restore()
mainWindow.showInactive()
}
destroyPanel()
createPanel(show)
createPanel(show, false, false)
restartingPanel = false
}

Expand Down

0 comments on commit 657101e

Please sign in to comment.