From 1bb5128729e13d0059820907233b9348849f468b Mon Sep 17 00:00:00 2001 From: Matheus Castello Date: Tue, 8 Mar 2022 02:47:35 -0300 Subject: [PATCH 1/3] Fix fluent acrylic bumping glasstron to 0.1.1 Signed-off-by: Matheus Castello --- app/package.json | 2 +- app/yarn.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/package.json b/app/package.json index ee861346..a5ec27f0 100644 --- a/app/package.json +++ b/app/package.json @@ -23,7 +23,7 @@ "electron-promise-ipc": "^2.2.4", "electron-updater": "^4.6.5", "fontmanager-redux": "1.1.0", - "glasstron": "0.0.7", + "glasstron": "0.1.1", "js-yaml": "4.1.0", "keytar": "^7.9.0", "mz": "^2.7.0", diff --git a/app/yarn.lock b/app/yarn.lock index 59cd8e2d..0b93d10d 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -1303,12 +1303,12 @@ github-from-package@0.0.0: resolved "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz" integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= -glasstron@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/glasstron/-/glasstron-0.0.7.tgz#d0f3e8344351bbcb89a39323282b4ddb06b03ba0" - integrity sha512-zeqfC0E153yBKWHB8ZBA5rT1o1dCCQcPECBryzWLX3uy6VTX3CUcy7kjk/4BlVztEIbpV2plEetpOxSAOe5cqw== +glasstron@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/glasstron/-/glasstron-0.1.1.tgz#491a2e6f7e7b285c3776c5f7af7aaba2269833b2" + integrity sha512-oLEMQM5wwdAQ44NrXD3wjk+b3dsfQG1XtkLn5pCxQNa3ri1AtWvvzpnhFUd88ZTmguHvkY4c3JKzcPSYaJAKKA== dependencies: - node-addon-api "^3.0.0" + node-addon-api "^4.0.0" x11 "^2.3.0" glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: @@ -2277,12 +2277,12 @@ node-addon-api@3.0.0: resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.0.0.tgz" integrity sha512-sSHCgWfJ+Lui/u+0msF3oyCgvdkhxDbkCS6Q8uiJquzOimkJBvX6hl5aSSA7DR1XbMpdM8r7phjcF63sF4rkKg== -node-addon-api@^3.0.0, node-addon-api@^3.0.2, node-addon-api@^3.1.0: +node-addon-api@^3.0.2, node-addon-api@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz" integrity sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw== -node-addon-api@^4.3.0: +node-addon-api@^4.0.0, node-addon-api@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f" integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ== From 502f72ec35a4576a42cce0414d6e3a41d007f803 Mon Sep 17 00:00:00 2001 From: Matheus Castello Date: Tue, 8 Mar 2022 02:48:56 -0300 Subject: [PATCH 2/3] Does not disable acrylic while dragging when using fluent It doesn't seem necessary to disable acrylic while dragging when using fluent with glasstron 0.1.1 Signed-off-by: Matheus Castello --- app/lib/window.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/window.ts b/app/lib/window.ts index 6143e8a2..b952c471 100644 --- a/app/lib/window.ts +++ b/app/lib/window.ts @@ -420,7 +420,7 @@ export class Window { let moveEndedTimeout: any = null const onBoundsChange = () => { - if (!this.lastVibrancy?.enabled || !this.disableVibrancyWhileDragging || !this.isFluentVibrancy) { + if (!this.lastVibrancy?.enabled || !this.disableVibrancyWhileDragging || this.isFluentVibrancy) { return } this.setVibrancy(false, undefined, false) From df77cc99d9010f5459cd182bb36afe031ed34e1a Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Tue, 8 Mar 2022 20:05:58 +0100 Subject: [PATCH 3/3] make vibrancy disabling optional --- app/lib/window.ts | 4 ++-- tabby-core/src/configDefaults.yaml | 1 + .../src/components/windowSettingsTab.component.pug | 10 ++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/lib/window.ts b/app/lib/window.ts index b952c471..8e2e3307 100644 --- a/app/lib/window.ts +++ b/app/lib/window.ts @@ -415,12 +415,12 @@ export class Window { this.window.webContents.on('new-window', event => event.preventDefault()) ipcMain.on('window-set-disable-vibrancy-while-dragging', (_event, value) => { - this.disableVibrancyWhileDragging = value + this.disableVibrancyWhileDragging = value && this.configStore.hacks.disableVibrancyWhileDragging }) let moveEndedTimeout: any = null const onBoundsChange = () => { - if (!this.lastVibrancy?.enabled || !this.disableVibrancyWhileDragging || this.isFluentVibrancy) { + if (!this.lastVibrancy?.enabled || !this.disableVibrancyWhileDragging || !this.isFluentVibrancy) { return } this.setVibrancy(false, undefined, false) diff --git a/tabby-core/src/configDefaults.yaml b/tabby-core/src/configDefaults.yaml index 6d83d41b..a9b6ce96 100644 --- a/tabby-core/src/configDefaults.yaml +++ b/tabby-core/src/configDefaults.yaml @@ -38,4 +38,5 @@ enableExperimentalFeatures: false pluginBlacklist: [] hacks: disableGPU: false + disableVibrancyWhileDragging: false language: null diff --git a/tabby-settings/src/components/windowSettingsTab.component.pug b/tabby-settings/src/components/windowSettingsTab.component.pug index 850ff9e1..77040985 100644 --- a/tabby-settings/src/components/windowSettingsTab.component.pug +++ b/tabby-settings/src/components/windowSettingsTab.component.pug @@ -315,3 +315,13 @@ h3.mt-4(translate) Hacks [(ngModel)]='config.store.hacks.disableGPU', (ngModelChange)='config.save(); config.requestRestart()' ) + +.form-line(*ngIf='hostApp.platform === Platform.Windows') + .header + .title Disable fluent background while dragging + .description Fluent background sometimes causes drag lag + + toggle( + [(ngModel)]='config.store.hacks.disableVibrancyWhileDragging', + (ngModelChange)='config.save(); config.requestRestart()' + )