Should I port my custom UI toolkit to Wayland or GTK/QT?

Brad Robinson brobinson at toptensoftware.com
Fri Oct 29 23:58:59 UTC 2021


Hey All,

I have a custom UI toolkit that I initially developed for my music
application over 15 years ago.  Currently it runs on Windows and OSX, and
I'd like to port it to Linux.

The main thing I'm trying to decide is whether to port directly to Wayland
or to a higher level UI toolkit like GTK or QT.  Here's what I'm thinking
about.

Pros:

* I really like the elegance of Wayland and think I'd enjoy coding against
it. It seems lightweight and the way of the future for Linux desktop apps.
* I've written a partial, proof of concept C# wrapper for Wayland which
seems to work fine. (my toolkit is written in C#)
* My toolkit already includes implementations of every control/widget I
need (including menus) so I don't need much of what GTK/QT provides.
Wayland seems like a nice fit in this regard.
* Regarding GTK/QT I'm not keen to learn yet another UI API unless I really
have to.  I've dabbled with GTK and didn't really like it. I've never used
QT but it seems over the top for my needs and possibly difficult to call
from C#. Wayland seems simple in comparison.
* I use Skia for graphics rendering. So long as I can blit to the screen
and get user input it should port reasonably well.

Cons:

* Seems like I might need to implement window decorations myself as I
understand not all Wayland compositors provide this.
* System dialogs - in particular file and folder selection dialogs.  I'd
need to either implement these myself or figure out how to invoke GTK/QT
versions?
* IME support - I believe this is outside the scope of Wayland.
* Automation/Accessibility - again outside the scope of Wayland.
* OS theme consistency.

I think all the cons are workable - either I'm happy to put in the work to
get it done (cons 1 and 2) or I can live without if I have to (cons 3 and
4), or I'm not that fussed about (con 5)

Other notes:

* Porting my apps from my toolkit to GTK or QT is out of the question as
that would entail porting literally hundreds of screens, dialogs and
widgets.
* I'm a long time Windows developer but I've never done Linux desktop
development.
* I'm not the only one in this boat.  The AvaloniaUI project is very
similar to my toolkit and while I can't speak for them, they currently use
X11 and I believe will have similar issues when it comes to Wayland,
Accessibility and IME.
* I'd also really like support for OpenGL.  Not a deal breaker but I
presume it's available through Wayland.
* My toolkit is closed source and only used by apps I develop - it's not
likely that it will suddenly have lots of additional requirements placed on
it besides what I'm currently considering.
* I don't have any particular distros that I need to support.  If my app
only works on particular distros then so be it.
* It's not urgent and I'm willing to put in the time.

So, with all that in mind, here's my questions:

1. Wayland, GTK or QT?
2. Are there options for IME and Accessibility for pure Wayland apps?
3. Assuming I go with Wayland, is there a Linux distro you would recommend
that includes a good, regularly updated, feature rich Wayland compositor.
(Unless there's a compelling reason to, I'd prefer not to have to compile a
compositor myself).
4. Any other advice - am I neglecting to consider anything obvious?

Sorry for the long post... much to think about and any advice greatly
appreciated.

Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20211030/f2176b1b/attachment.htm>


More information about the wayland-devel mailing list