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

Creating a window shows it before calling .Show() and .Hide() does not work #1835

Closed
Jacalz opened this issue Jan 20, 2021 · 1 comment
Closed
Labels
blocker Items that would block a forthcoming release bug Something isn't working Driver:mobile Issues relating to the mobile driver specifically

Comments

@Jacalz
Copy link
Member

Jacalz commented Jan 20, 2021

Describe the bug:

Creating a second window and building using the mobile driver shows the second window without every calling .Show() on the second window. The only way to avoid showing the window is to explicitly close it. Calling .Hide() leaves the first window not rendering at all.

To Reproduce:

Steps to reproduce the behaviour:

  1. Run the example code using go run -tags mobile main.go
  2. Close the second window by adding w2.Close()
  3. Run the modified example code using go run -tags mobile main.go
  4. Change the w2.Close() call to w2.Hide()
  5. Run the modified example code using go run -tags mobile main.go

Screenshots:

image

Example code:

package main

import (
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("Hello")

	w2 := a.NewWindow("Second")
	w2.SetContent(widget.NewLabel("Second window"))

	hello := widget.NewLabel("Hello Fyne!")
	w.SetContent(container.NewVBox(
		hello,
		widget.NewButton("Hi!", func() {
			hello.SetText("Welcome :)")
		}),
	))

	w.ShowAndRun()
}

Device (please complete the following information):

  • OS: Linux (-tags mobile) and Android have been tested
  • Version: 5.10.6
  • Go version: 1.15.6 and 1.13.8
  • Fyne version: 2.0.0-rc5
@Jacalz Jacalz added bug Something isn't working blocker Items that would block a forthcoming release Driver:mobile Issues relating to the mobile driver specifically labels Jan 20, 2021
@andydotxyz
Copy link
Member

On develop and will be in 2.0.1 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Items that would block a forthcoming release bug Something isn't working Driver:mobile Issues relating to the mobile driver specifically
Projects
None yet
Development

No branches or pull requests

2 participants