Running the app in native Wayland mode for users running on Linux's Wayland session
Have you read a contributing guide?
- [X] I have read CONTRIBUTING.md
- [X] I have searched the existing requests and didn't find any that were similar
- [X] I have considered creating a pull request instead and want to proceed
Clear and concise description of the problem
Currently, the app runs in XWayland mode instead of native Wayland mode. Running in XWayland mode makes everything look blurry with fractional scaling enabled, as shown in the screenshot below (desktop fractional scaled at 125%):
XWayland mode(left), native Wayland mode(right)
Suggested solution
Using --ozone-platform-hint=auto flag by default. This flag automatically checks whether the users are running on X11 or Wayland session, then uses the appropriate mode.
--enable-features=WaylandWindowDecorations is also necessary to enable Wayland's window decorations.
Alternative
Currently, I am running the app with this command to enable native Wayland mode in my Wayland session:
./Anytype-0.35.2.AppImage --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto
Additional context
No response
I tried adding the flag to my build, but it doesn't seem to have any effect at all. I don't know why 🤯
@kreaninw did you have any luck in getting it to run on wayland? I still haven't figured out how to do it -- those flags work for most of the Electron apps I use but not for Anytype.
@kreaninw did you have any luck in getting it to run on wayland? I still haven't figured out how to do it -- those flags work for most of the Electron apps I use but not for Anytype.
As of Anytype 0.3.54, I can run the app on native Wayland with this launch flag:
./Anytype-0.35.4.AppImage --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto
Yup, I used those flags and still doesn't run on Wayland :( I'm on ArchLinux with GNOME by the way.
I'm unable to run Anytype under Wayland natively too. NixOS + Hyprland.