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

window.Resize() is not working correctly when building for Wayland #5526

Open
2 tasks done
DaanVervacke opened this issue Feb 10, 2025 · 0 comments
Open
2 tasks done
Labels
unverified A bug that has been reported but not verified Wayland Issues related to Wayland support

Comments

@DaanVervacke
Copy link

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 building with -tags wayland, the window.Resize() function does not seem to work like it should. Resulting in the window being spawned in at it's minimum size. This seems to be consistent. When disabling resizing with window.SetFixedSize(true) the window size seems to be correct, but the contents stay at their minimum size. Building without the wayland tag produces the correct results.

Not sure if it's related but building for wayland throws this error:

In file included from ../../../go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/c_glfw_lin.go:10:
../../../go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/glfw/src/wl_window.c:29:9: warning: "_GNU_SOURCE" redefined
   29 | #define _GNU_SOURCE
      |         ^~~~~~~~~~~
<command-line>: note: this is the location of the previous definition

How to reproduce

  1. Create a new window object
  2. Resize the window with the Resize function. e.g. window.Resize(fyne.NewSize(600, 400))
  3. Built for X11 and for Wayland
  4. Run both binaries and compare the results

Screenshots

First row: x11 and wayland build without setting a fixed size
Second row: x11 and wayland build with a fixed size
All builds use window.Resize(fyne.NewSize(600, 400))
Image

Example code

a := fyne.CurrentApp()
w := a.NewWindow("anything")
// w.SetFixedSize(true)
w.Resize(fyne.NewSize(600, 400))
w.ShowAndRun()

Fyne version

2.5.4

Go compiler version

1.23.4

Operating system and version

Fedora Linux Asahi Remix 41 (KDE Plasma) aarch64

Additional Information

Let me know if I need to provide more examples. Happy to help!

@DaanVervacke DaanVervacke added the unverified A bug that has been reported but not verified label Feb 10, 2025
@dweymouth dweymouth added the Wayland Issues related to Wayland support label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unverified A bug that has been reported but not verified Wayland Issues related to Wayland support
Projects
None yet
Development

No branches or pull requests

2 participants