Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed Oct 30, 2023
1 parent 9ae40e1 commit 4c171fd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"check:deps": "depcheck --ignores=bindings,electron-builder-squirrel-windows,electron-reloader,sass --ignore-dirs=build,dist",
"check:circular": "madge --circular .",
"depcheck": "yarn check:deps && yarn check:circular",
"release": "np --branch release && yarn build:release",
"release": "np --no-tests --branch release && yarn build:release",
"release:snap": "snapcraft upload --release=CrossOver*.snap",
"pack": "rm -f *.tgz && electron-builder --dir",
"sh:copyexe": "cp dist/CrossOver-[!Portable]*.exe dist/CrossOver.exe",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<title>CrossOver</title>
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; media-src *;">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; media-src *;">
<link rel="stylesheet" href="styles/dist/index.css">
<script type="text/javascript" src="vendor/feather/feather-icons.min.js"></script>
<script type="text/javascript" src="vendor/inline-svg/inline-svg.min.js"></script>
Expand Down
12 changes: 9 additions & 3 deletions test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,18 @@ const closeApp = async () => {

const focusedMinimizedVisible = async ( { electronApp, windowName } ) => electronApp.evaluate( async ( { BrowserWindow }, windowName ) => {

console.log( windowName )
const windows = await BrowserWindow.getAllWindows()
const win = windows.find( w => w.title === windowName )
let win = windows.find( w => w.title === windowName )
if ( !win ) {

console.warn( `Window "${windowName}" not found, using "${win.title}" instead` )
win = windows[0]

}

win?.focus()

return { focused: win.isFocused(), minimized: win.isMinimized(), visible: win.isVisible() }
return { focused: win?.isFocused(), minimized: win?.isMinimized(), visible: win?.isVisible() }

}, windowName )

Expand Down

0 comments on commit 4c171fd

Please sign in to comment.