GithubHelp home page GithubHelp logo

Comments (11)

gen2brain avatar gen2brain commented on September 25, 2024

Well, the error is normal as Wayland doesn't support setting the window position. With the latest GLFW update binary now supports both X11 and Wayland and it will detect what to use in runtime (based on XDG_SESSION_TYPE).

What is not normal is that the coordinates are off, what compositor you are using? I tested a few examples and all works for me with labwc. Can you try in the X11 session just to confirm? Anyway, there is nothing that will happen here or that I can do to fix that. I can probably just return the wayland build tag, or maybe x11 tag to be something like compatibility mode, i.e. to force X11 on Wayland like before.

from raylib-go.

ax4w avatar ax4w commented on September 25, 2024

I use gnome. I just tried x11 and it seems to work (I changed the coordinates to (0,0) just to be sure):

image

As it worked in the older version, I think that forcing X11 would be the best solution.

from raylib-go.

gen2brain avatar gen2brain commented on September 25, 2024

The x11 build tag is added in c3665eb.

If you can, please also test with go build -tags sdl, as SDL will also detect and use Wayland I think. You can also force SDL_VIDEODRIVER to x11 or wayland there. I wonder if your issue is related to GNOME fractional scaling in some way and perhaps GLFW doesn't handle it properly.

from raylib-go.

ax4w avatar ax4w commented on September 25, 2024

I pulled the newest version with go get -v -u github.com/gen2brain/raylib-go/raylib
and the issue is still there (weirdly). With the sdl build tag, everything is as expected:
img

Without sdl it looks like this again:
img

go.mod is

module demo

go 1.22.0

require (
	github.com/ebitengine/purego v0.6.1 // indirect
	github.com/gen2brain/raylib-go/raylib v0.0.0-20240227114648-c3665eb9abf8 // indirect
	golang.org/x/sys v0.17.0 // indirect
)

did you change anything else since that version v0.0.0-20240125111008-83d871a38f28 ?

from raylib-go.

gen2brain avatar gen2brain commented on September 25, 2024

Check the output, when you see GLFW Wayland errors it is using Wayland. When you build with x11 tag, you should not see that anymore.

from raylib-go.

gen2brain avatar gen2brain commented on September 25, 2024

Also, if you already checked SDL, try to force wayland then force x11, to make sure it is not using the compatibility layer there. I mean, force with SDL_VIDEODRIVER=wayland.

from raylib-go.

ax4w avatar ax4w commented on September 25, 2024

with x11 build tag, its working. Both sdl2 wayland and x11 seem to work aswell

from raylib-go.

gen2brain avatar gen2brain commented on September 25, 2024

Yes, you must use the x11 tag if you want the old behavior, the old one was to use X11.

from raylib-go.

ax4w avatar ax4w commented on September 25, 2024

Alright, then it seems to be a problem with glfw and wayland i assume?

from raylib-go.

gen2brain avatar gen2brain commented on September 25, 2024

Yes, to be precise, with GLFW, Wayland, and GNOME/mutter, I guess it would work in KDE/Kwin, and I did a test in labwc where works.

from raylib-go.

ax4w avatar ax4w commented on September 25, 2024

I see, good to know. Then the issue is resolved :D you can close it now

from raylib-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.