Skip to content

Commit

Permalink
Skip rendering loop when master window is minimized
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDang committed Jan 27, 2022
1 parent 94f03df commit beab507
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions MasterWindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package giu
import (
"image"
"image/color"
"log"
"runtime"
"time"

Expand Down Expand Up @@ -191,15 +190,13 @@ func (w *MasterWindow) sizeChange(width, height int) {
}

func (w *MasterWindow) render() {
if !w.platform.IsVisible() {
if !w.platform.IsVisible() || w.platform.IsMinimized() {
return
}

Context.invalidAllState()
defer Context.cleanState()

log.Println("window visibility:", w.platform.IsVisible())

rebuildFontAtlas()

p := w.platform
Expand Down

0 comments on commit beab507

Please sign in to comment.