anyproto / anytype-ts

Official Anytype client for MacOS, Linux, and Windows
https://anytype.io
Other
4.31k stars 256 forks source link

Running the app in native Wayland mode for users running on Linux's Wayland session #305

Open archerallstars opened 1 year ago

archerallstars commented 1 year ago

Have you read a contributing guide?

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%):

Screenshot from 2023-09-30 22-57-17

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

archerallstars commented 1 year ago

I tried adding the flag to my build, but it doesn't seem to have any effect at all. I don't know why 🤯

astrocaat commented 11 months ago

@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.

archerallstars commented 11 months ago

@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
astrocaat commented 11 months ago

Yup, I used those flags and still doesn't run on Wayland :( I'm on ArchLinux with GNOME by the way.

bcyran commented 3 weeks ago

I'm unable to run Anytype under Wayland natively too. NixOS + Hyprland.