Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetFullScreen require sleep some time to take effect #5031

Open
2 tasks done
xfaris opened this issue Jul 26, 2024 · 1 comment
Open
2 tasks done

SetFullScreen require sleep some time to take effect #5031

xfaris opened this issue Jul 26, 2024 · 1 comment
Labels
unverified A bug that has been reported but not verified

Comments

@xfaris
Copy link

xfaris commented Jul 26, 2024

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

SetFullScreen require sleep some time to take effect; otherwise, it won't go fullscreen and the window's position will be incorrect.

How to reproduce

I see some code in internal/driver/glfw/window.go

if w.fullScreen { // this does not work if called before viewport.Show()
go func() {
time.Sleep(time.Millisecond * 100)
w.SetFullScreen(true)
}()
}

Screenshots

No response

Example code

func myShow() {
window.Show()
time.Sleep(1 * time.Second)
window.SetFullScreen(true)
}

func myHide() {
window.SetFullScreen(false)
window.Hide()
}

myShow -> myHide -> myShow

Fyne version

2.4.5

Go compiler version

1.20

Operating system and version

windows 10

Additional Information

No response

@xfaris xfaris added the unverified A bug that has been reported but not verified label Jul 26, 2024
@xfaris xfaris changed the title SetFullScreen must Sleep SetFullScreen require sleep some time to take effect Jul 26, 2024
@andydotxyz
Copy link
Member

I cannot replicate from the code provided - please include a complete sample that demonstrates the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

2 participants