Skip to content

Entry cursor is not visible with animations off #4508

Closed
@easycat

Description

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

When the Entry box receives focus, CPU usage will increase slightly. When there are many controls on a poorly configured machine, the window CPU usage can be high, even reaching up to 50%. This can make it difficult or impossible to input text properly.

How to reproduce

in the centos8 or other linux.

The code you provided compiles and runs on Linux.

When there are no operations performed, the CPU usage can be observed to range from approximately 1% to 3% using top comma.
When the mouse clicks on an Entry control widget, the CPU usage will increase to around 7-8%.
After clicking a button (focus is move out form Entry), the CPU usage will decrease to approximately 3% left or right.

I tried disabling the animation of the Entry widget, but despite the above operations, there was no significant increase in CPU usage. However, the cursor did not show up.

image

Screenshots

The focus is not on the Entry.
image
The focus on the Entry.
image
The focus move out Entry.
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")

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

	w.ShowAndRun()
}

Fyne version

2.4.3, 2.4.2, 2.4.1, 2.3.5

Go compiler version

1.18.10

Operating system and version

centos8 or other linux

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions