diff --git a/app/lib/window.ts b/app/lib/window.ts index 6562b4f5..f2592d7e 100644 --- a/app/lib/window.ts +++ b/app/lib/window.ts @@ -11,7 +11,7 @@ let AccentState: any let DwmEnableBlurBehindWindow: any if (process.platform === 'win32') { SetWindowCompositionAttribute = require('windows-swca').SetWindowCompositionAttribute - AccentState = require('windows-swca').AccentState + AccentState = require('windows-swca').ACCENT_STATE DwmEnableBlurBehindWindow = require('windows-blurbehind').DwmEnableBlurBehindWindow } @@ -103,16 +103,14 @@ export class Window { if (process.platform === 'win32') { if (parseFloat(os.release()) >= 10) { let attribValue = AccentState.ACCENT_DISABLED - let color = 0x00000000 if (enabled) { if (parseInt(os.release().split('.')[2]) >= 17063 && type === 'fluent') { - attribValue = AccentState.ACCENT_ENABLE_FLUENT - color = 0x01000000 // using a small alpha because acrylic bugs out at full transparency. + attribValue = AccentState.ACCENT_ENABLE_ACRYLICBLURBEHIND } else { attribValue = AccentState.ACCENT_ENABLE_BLURBEHIND } } - SetWindowCompositionAttribute(this.window, attribValue, color) + SetWindowCompositionAttribute(this.window.getNativeWindowHandle(), attribValue, 0x00000000) } else { DwmEnableBlurBehindWindow(this.window, enabled) } diff --git a/app/package.json b/app/package.json index 06c4c1f7..da120309 100644 --- a/app/package.json +++ b/app/package.json @@ -36,7 +36,7 @@ }, "optionalDependencies": { "windows-blurbehind": "^1.0.0", - "windows-swca": "^1.1.1" + "windows-swca": "^2.0.1" }, "devDependencies": { "@types/mz": "0.0.31" diff --git a/app/tsconfig.json b/app/tsconfig.json index 2b1acbeb..cf51608a 100644 --- a/app/tsconfig.json +++ b/app/tsconfig.json @@ -9,7 +9,6 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": true, - "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "noUnusedParameters": true, diff --git a/app/yarn.lock b/app/yarn.lock index b70aa417..9aee0c78 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -70,6 +70,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.13.tgz#530f0f9254209b0335bf5cc6387822594ef47093" integrity sha512-Y3EAG7VA7NVNbZek/fjJtILnmTk/ZfpJuWZGDBqDZ1dVIxgJJJ82fXPW7pKnqyV9CD/9bcPOCi7eErUqGMHOrA== +"@types/node@^10.12.18": + version "10.12.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" + integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== + accessibility-developer-tools@^2.11.0: version "2.12.0" resolved "https://registry.yarnpkg.com/accessibility-developer-tools/-/accessibility-developer-tools-2.12.0.tgz#3da0cce9d6ec6373964b84f35db7cfc3df7ab514" @@ -620,10 +625,12 @@ windows-blurbehind@^1.0.0: resolved "https://registry.yarnpkg.com/windows-blurbehind/-/windows-blurbehind-1.0.0.tgz#050efb988704c44335bdc3efefd757f6e463b8ac" integrity sha512-lO+A7fhTHO7oy9zJM3o1AdzfSQrmtPkdwvleeuww840ghijjEA1f1Zp8bKA3mJu2DFNtVT40fwmqtgsCGat4UA== -windows-swca@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/windows-swca/-/windows-swca-1.1.1.tgz#0b3530278c67d408baac71c3a6aeb16d55318bf8" - integrity sha512-hKmHrNYJD72Kg0u35fjkiFIuMKuC+Tztmf3Obnf4aTkNjstEpbSEspEeSo3ZNixaVCETA1dLbDkVUQVF1QxtWA== +windows-swca@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/windows-swca/-/windows-swca-2.0.1.tgz#25d78ce25251292061494a0ad07c02282b28b4e3" + integrity sha512-flj+HD6RUemZUvKKguLLnMUOYkQSgDu9qrhUIO4cydvtb/x+sxU8XmpZUtugYuydcdikB9zsCOMgKnAqIQ+7nw== + dependencies: + "@types/node" "^10.12.18" wrap-ansi@^2.0.0: version "2.1.0"