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

Fix regression causing flickery windows when hiding #4171

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

Jacalz
Copy link
Member

@Jacalz Jacalz commented Aug 21, 2023

Description:

This reverts commit 5bac179.

Reason for revert: This code runs when hiding and closing windows as well. Always doing a show results in flickering when trying to hide a second window by pressing a button inside that window. I don't know of a better solution so I just revert the PR for now to avoid the bug.

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

This reverts commit 5bac179, reversing
changes made to 580211a.

Reason for revert: This code runs when hiding and closing windows as well. Always doing a show results in flickering when trying to hide a second window by pressing a button inside that window.
@coveralls
Copy link

Coverage Status

coverage: 65.302% (-0.001%) from 65.303% when pulling 0e7c82c on Jacalz:fix-flickery-windows into 8be6541 on fyne-io:develop.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the issue of flickering is Linux (or at least not Darwin) so perhaps this could be put inside a GOOS check instead of being reverted?

@Jacalz
Copy link
Member Author

Jacalz commented Aug 21, 2023

Would you mind just testing this with the following code first? It should allow you to replicate it easily.

package main

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

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

	w2 := a.NewWindow("Second")
	w2.SetContent(widget.NewButton("Hide", w2.Hide))
	w2.Show()

	w.Resize(fyne.NewSquareSize(50))
	w.ShowAndRun()
}

@andydotxyz
Copy link
Member

andydotxyz commented Aug 21, 2023

OMG yes that replicates on macOS too. With both windows visible.
Reverting fixes. That is the way - we need a different fix to this bug!

@Jacalz Jacalz merged commit d06fffd into fyne-io:develop Aug 21, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants