flathub / com.mojang.Minecraft

https://flathub.org/apps/details/com.mojang.Minecraft
34 stars 13 forks source link

Enable native Wayland support #84

Open vchernin opened 3 years ago

vchernin commented 3 years ago

There are patches for GLFW which let Minecraft run in native Wayland mode. This is beneficial to avoid a dependency on xwayland for Wayland users. Theoretically we could put a patched GLFW in the Flatpak (although I’m not sure how exactly).

AsciiWolf commented 3 years ago

Thanks for the ticket! I would love native Wayland support, but on the other hand I am not sure whether I like adding unofficial third-party hacks that can broke after a new game update. :-/

vchernin commented 3 years ago

Yeah that’s definitely understandable, maybe the patches could be tested out in the Flathub beta branch?

vchernin commented 3 years ago

I managed to get the patched GLFW to build in the Flatpak. Native Wayland doesn't actually work yet but it's progress. See https://github.com/vchernin/com.mojang.Minecraft

A few things I've noticed:

I could open a PR against master for this, or if a beta branch could be created I could open a PR against that. Edit: See #85

kb-1000 commented 3 years ago

I don't think this is a good idea... It has the potential to break things (and does break things), for example Forge on 1.13+ doesn't work until you disable a feature of it. And I'm pretty sure it doesn't apply at all to older versions.

vchernin commented 3 years ago

I don't think this is a good idea...

It has the potential to break things (and does break things), for example Forge on 1.13+ doesn't work until you disable a feature of it.

And I'm pretty sure it doesn't apply at all to older versions.

If you're referring to the stuff going on in #96, yes it's problematic which is why I don't think it makes sense to merge. The point there is making it easier to test the changes in GLFW so they can be merged upstream.

But if you're referring to Wayland in GLFW and other apps in general, well that's an inevitability at this point.

If you do have issues running in Wayland natively I'd suggest reporting them to the relevant PRs in GLFW, which reminds me I should probably do the same.

kb-1000 commented 3 years ago

I don't mean GLFW in general, just here. Don't mess around with GLFW, keep the builds Mojang bundles. and... that window icons require an app id or xwayland on wayland should probably be changed... (but that's only loosely related here, icons are one of the GLFW features used by Minecraft)