Skip to content

Commit

Permalink
don't disable vibrancy while dragging if it's not fluent
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Dec 12, 2021
1 parent 04533a6 commit 6eff390
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/lib/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class Window {
private disableVibrancyWhileDragging = false
private configStore: any
private touchBarControl: any
private isFluentVibrancy = false

get visible$ (): Observable<boolean> { return this.visible }
get closed$ (): Observable<void> { return this.closed }
Expand Down Expand Up @@ -165,6 +166,7 @@ export class Window {
this.window.blurType = enabled ? type === 'fluent' ? 'acrylic' : 'blurbehind' : null
try {
this.window.setBlur(enabled)
this.isFluentVibrancy = enabled && type === 'fluent'
} catch (error) {
console.error('Failed to set window blur', error)
}
Expand Down Expand Up @@ -385,7 +387,7 @@ export class Window {

let moveEndedTimeout: any = null
const onBoundsChange = () => {
if (!this.lastVibrancy?.enabled || !this.disableVibrancyWhileDragging) {
if (!this.lastVibrancy?.enabled || !this.disableVibrancyWhileDragging || !this.isFluentVibrancy) {
return
}
this.setVibrancy(false, undefined, false)
Expand Down

0 comments on commit 6eff390

Please sign in to comment.