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

the position of window is changed when status change from show to hide,then to show #1116

Closed
kutear opened this issue Jun 19, 2020 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@kutear
Copy link

kutear commented Jun 19, 2020

Describe the bug:

To Reproduce:

Steps to reproduce the behaviour:

  1. create app with window
  2. run app
  3. drag app from position A to position B
  4. hide window
  5. show window
  6. [ERROR] app will show at position A

Screenshots:

https://youtu.be/P_RNw4Idue0

Example code:

package main

import (
	"fyne.io/fyne"
	"fyne.io/fyne/app"
	"fyne.io/fyne/widget"
	"time"
)

func main() {
	a := app.New()

	w := a.NewWindow("Hello")
	w.SetContent(widget.NewVBox(
		widget.NewLabel("Hello Fyne!"),
		widget.NewButton("Hide", func() {
			w.Hide()
			time.AfterFunc(2*time.Second, func() { w.Show() })
		}),
	))

	w.Resize(fyne.NewSize(480, 320))
	w.ShowAndRun()
}

Device (please complete the following information):

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/XXX/.cache/go-build"
GOENV="/home/XXX/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/XXX/Applications/Golang/Path"
GOPRIVATE=""
GOPROXY="https://goproxy.io,direct"
GOROOT="/home/XXX/Applications/Golang/Root"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/XXX/Applications/Golang/Root/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build184922356=/tmp/go-build -gno-record-gcc-switches"

fyne version: a82c328
desktop: ubuntu18.04

andydotxyz added a commit to andydotxyz/fyne that referenced this issue Jun 20, 2020
Also we don't have to recreate the window either, waste of CPU
Fixes fyne-io#1116
@andydotxyz andydotxyz added the bug Something isn't working label Jun 20, 2020
@andydotxyz andydotxyz added this to the 1.3.x milestone Jun 20, 2020
@andydotxyz
Copy link
Member

Oops, I forgot the pull request - this is now open

andydotxyz added a commit that referenced this issue Jun 22, 2020
Also we don't have to recreate the window either, waste of CPU
Fixes #1116
@andydotxyz
Copy link
Member

On develop for testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants