flathub / io.typora.Typora

https://flathub.org/apps/details/io.typora.Typora
3 stars 5 forks source link

flatpack does not launch in Wayland Session #13

Closed msandy1 closed 2 years ago

msandy1 commented 2 years ago

The flatpak version of this app does not launch or crashes on launch in a wayland session. If you switch to xorg session it executes just fine. the binary also executes fine in a wayland session.

running in Fedora Linux 36 fresh install

this issue started in Fedora Linux 35 when the title bar stopped appearing. and now the whole application doesn't run.

syco commented 2 years ago

wayland seems to be a common issue on fedora, have you tried this solution? https://github.com/flathub/io.typora.Typora/issues/12

meeas commented 2 years ago

Just confirming that Typora runs fine after disabling Wayland support using Flatseal.

I would suggest updating the flatpak and removing --enable-features=UseOzonePlatform --ozone-platform=wayland from the execution string when staring the Typora binary. That is the heart of the issue, and breaking the app for anyone not running the latest version of Ubuntu, at least what I can tell, and I suspect everyone running Xorg. Typora's standalone binary has the same issue if you add those two options to the executable, and I suspect has some bug in it which I'm about to report to them. But as for the Flatpak, Typora themselves say to only add those opens if you are running Wayland, and at least 50% of the Linux community is not.

I think a better solution is to leave Wayland support enabled in the Flatpak, remove the two options from the executable, and suggest in the app description to try adding those two options to the .desktop file if you are running Wayland. To my knowledge, the only benefit it add is the ability to pinch/zoom into the window content. That will be better than delivering an app that breaks everyone on Xorg and on non-Ubuntu Wayland machines. This solution also still leaves the ability for those that want those features to add them without having to modify the Flatpak permissions.

syco commented 2 years ago

I'm 100% with you on those options, I just want to avoid the drama of wayland/no wayland, people gets too emotional about it. Here's where it all started: https://github.com/flathub/io.typora.Typora/issues/10 Anyway I'll push an update later today to remove them. I see flatpak is very popular fedora, ubuntu people can find a way around it.

meeas commented 2 years ago

Ya, I just spent the last 30 minutes digging through those issues in their repo. Seems like the missing window decorations are affecting everyone on Wayland including Ubuntu users. I think the title of that bug is perfect!

And the change I proposed should still work for all Ubuntu users running Wayland since it will default to XWayland compatibility layer. I doubt you will get very few if any complaints, and when you do you can point them back to the parent project issues. If you add the Ozone options to the description, I would also add the warning of the incomplete Wayland integration upstream which is ALPHA quality at best.

syco commented 2 years ago

Pushed now, should get in the repository soon.

JulianGro commented 1 year ago

Let's dump some more information here: Running with --ozone-platform-hint=auto seems to choose Wayland on Wayland and X11 on X11. Without it, it won't run for me on some Wayland systems. (Presumably on the ones where XWayland isn't working)

It looks like the problem that happened in this issue is that Typora has some issues on Wayland. During my limited testing, it seems to work fine on Wayland now. The only issue I was able to find is text rendering on MathJax not working correctly. https://github.com/typora/typora-issues/issues/5811 See screenshots below. (Click to expand)

X11: Screenshot_20230824_141601_x11

Wayland: Screenshot_20230824_141705_wayland