fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
25.18k stars 1.4k forks source link

Password entry shifts window on wlroots #5172

Open Arzumify opened 1 month ago

Arzumify commented 1 month ago

Checklist

Describe the bug

On wlroots based WMs, using the password revealer in a PasswordEntry will shift the window up by about 10 pixels

How to reproduce

  1. Create a password revealer
  2. Run the app on a wlroots based DE, like wayfire
  3. Use the password revealer

Screenshots

https://github.com/user-attachments/assets/d259ec97-69b3-481a-90b8-3ee1fab195c9

Example code

package main

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

func main() { signupApp := app.New() signupWindow := signupApp.NewWindow("Login") signupWindow.Resize(fyne.NewSize(800, 600))

// Create the login form
username := widget.NewEntry()
username.SetPlaceHolder("Username")
password := &widget.Entry{Password: true}
password.SetPlaceHolder("Password")

// Add them all to the form
form := &widget.Form{
    Items: []*widget.FormItem{ // we can specify items in the constructor
        {Text: "Username", Widget: username},
        {Text: "Password", Widget: password}},
    OnSubmit: func() { // optional, handle form submission
        fmt.Println("Username:", username.Text)
        fmt.Println("Password:", password.Text)
        signupWindow.Close()
    },
}

signupWindow.SetContent(form)
signupWindow.ShowAndRun()

}

Fyne version

v2.5.1

Go compiler version

1.23.1

Operating system and version

Linux 6.9.12-200.fc40.x86_64

Additional Information

Tested on Wayfire DE

Arzumify commented 1 month ago

Temporary fix is to use GNOME, which I'm not a fan of :P

andydotxyz commented 1 month ago

Oh man that is crazy - not only does that button not control windows but we have no window move code that I can think of in Fyne!

Does the same happen if you skip the Resize() call?

Arzumify commented 1 month ago

Oh man that is crazy - not only does that button not control windows but we have no window move code that I can think of in Fyne!

Does the same happen if you skip the Resize() call?

I'll test it later, I'm at work right now Should be free at about 6 UTC

Arzumify commented 1 month ago

Oh man that is crazy - not only does that button not control windows but we have no window move code that I can think of in Fyne!

Does the same happen if you skip the Resize() call?

Yes, it still occurs

Arzumify commented 1 month ago

I've also noticed that using resize breaks the built-in full-screen function of the WM, but doesn't occur without using resize.