Skip to main content

One post tagged with "wayland"

View All Tags

· 2 min read
Divya Antony J.R

Wayland is the most painful thing I worked with when developing Qt application, seriously Wayland is surely not a replacement for Xorg, it simply breaks working applications.

I know Xorg is old, but still I have no issue using it even though it's slow.

Let's come to the topic, I was struggling to support Spirit for Wayland, at least for GNOME Shell (Wayland) but it is just so painful. I'm not complaining about getting the active window under Wayland, that is just fine with a lot of workarounds.

But imagine building your Qt application without using move() and resize() methods in QWidget. For those who don't know about Qt development, these methods are extremely important, at least for Spirit.

move() method in the QWidget class allows a QWidget to move to a specific co-ordinate in the screen, resize() helps to resize a QWidget to some dimension. Guess what Wayland does not allow a application to modify it's own position and dimenstion. I mean why?? GNOME developers claims it's for security reason.

Without move() method I can't find a way to move the Spirit window around, without resize we can't scale. Hell I can't even center my dialog boxes under Wayland.

So the only solution exists is that, use gnome-shell-extension and use QProcess to call gdbus and get active window (which is fine), move our own Spirit widget (not fine, it's just painful) and resize Spirit widget.

So we have to call system commands to stuff I did with no issue on X11 with Qt framework. So support for Wayland is going to take a long time folks. I'm sorry.