Skip to content

Commit

Permalink
Fix fullscreen handling on move
Browse files Browse the repository at this point in the history
  • Loading branch information
Zubnix committed Aug 16, 2024
1 parent 895aeda commit 1cf6d98
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/compositor/src/Desktop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,17 @@ export class DesktopSurface {
}

setFullscreen(fullscreen: boolean): void {
const output = this.role.view.relevantScene
const outputSize: Size = output?.canvas ?? { width: 0, height: 0 }
this.role.configureFullscreen(fullscreen)
this.role.configureSize(outputSize)
if (fullscreen) {
const output = this.role.view.relevantScene
let outputSize: Size = { width: 0, height: 0 }
if (output?.canvas) {
outputSize = { width: output.canvas.width, height: output.canvas.height }
}
this.role.configureFullscreen(fullscreen)
this.role.configureSize(outputSize)
} else {
this.role.configureFullscreen(fullscreen)
}
}

setMaximized(maximized: boolean): void {
Expand Down

0 comments on commit 1cf6d98

Please sign in to comment.