Skip to content

Commit

Permalink
Fix resizing fullscreen issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jul 21, 2021
1 parent 0f064e8 commit dc757cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/driver/glfw/loop.go
Expand Up @@ -123,9 +123,10 @@ func (d *gLDriver) runGL() {

w.viewLock.RLock()
expand := w.shouldExpand
fullScreen := w.fullScreen
w.viewLock.RUnlock()

if expand {
if expand && !fullScreen {
w.fitContent()
w.viewLock.Lock()
w.shouldExpand = false
Expand Down
2 changes: 1 addition & 1 deletion internal/driver/glfw/window.go
Expand Up @@ -270,7 +270,7 @@ func (w *window) SetMainMenu(menu *fyne.MainMenu) {
}

func (w *window) fitContent() {
if w.canvas.Content() == nil {
if w.canvas.Content() == nil || w.fullScreen {
return
}

Expand Down

0 comments on commit dc757cd

Please sign in to comment.