TeXmacs under Wayland

I now switched to Wayland (more precisely, the swaywm). There seem some issues of TeXmacs under Wayland:

  1. I don’t know why: TeXmacs seems to ignore the environment variable QT_QPA_PLATFORM. In particular, if I disable XWayland, I can no longer run TeXmacs directly, even after setting export QT_QPA_PLATFORM=wayland. A workaround: run texmacs -platform wayland.

  2. I enabled the global scaling in swaywm (so that I do not have to set HiDPI for every app). It seems to me that the TeXmacs rendering is then blurry (the menu is however sharp, after setting -platform wayland).

This post might be interesting as well for the texmacs-dev mailing list (info on the mailing lists at https://www.texmacs.org/tmweb/home/ml.en.html).

Google tells us that there was a post https://lists.texmacs.org/wws/arc/texmacs-users/2020-07/msg00064.html years ago but without follow-up.

Perhaps then a message should reference that older one :wink:

My impression is that these mailing lists are very inactive now (or maybe for a couple of time).

As far as I know the developers read the messages of texmacs-users and of texmacs-dev. On the other hand I have some hints that Joris van der Hoeven does not read the forum (he sent a message to the mailing list with that statement I think, I did not look for that message now).

There was a bug previously that was hacked around by overriding QT_GPA_PLATFORM to xcb (https://savannah.gnu.org/bugs/index.php?57684). The cause of the bug wasn’t clear and has since disappeared for me (probably it is only present in specific version of Qt).

Is it by default that QT_GPA_PLATFORM is hard set to be xcb in current TeXmacs? It would explain why I have to run TeXmacs with texmacs -platform wayland to indicate that I do not run TeXmacs under XWayland?

Yes, it is the default, ignoring any user-set value:
https://codeberg.org/woutersj/texmacs/src/commit/97d906937b2c11b7aca7cdce791a9eb2f5b73716/src/Texmacs/Texmacs/texmacs.cpp#L692

It seems better to modify this when the Wayland support is more complete (the only issue that I see now is the blur of rendering documents when a global scaling is enabled — and this issue also exists under XWayland, thus such an option does not help in this case either).