Child window positioning in Wayland/Weston

We have targets built using Colibri iMX6DL/ULL running BSP 5.7.0 (Yocto: 3.1 / Dunfell) and runs a Gtk application for the user interface.

One of the target runs the X server while the other one runs Wayland/Weston. In the target running Weston, we are unable to set the position of child windows (Gtk::Window, Gtk::Dialog, Gtk::MessageDialog etc.), even worse they keep appearing at random locations. Now I understand that while an application can request the window to be positioned anywhere on screen (or relative to the top level window), it is totally up to the window manager to honor that request. I also understand that Weston does not allow the application to set its position by itself (for understandable reasons). However not being able to position the child windows / dialogs is becoming quite unnerving.

Making a child window / dialog transient using Gtk::Window::set_transient_for works as expected on the development machine (Ubuntu 20) as well on the target with X. However it doesn’t work on Weston.

Other posts online describing same issue

Please let me know if anyone has come across this issue and found a solution / workaround.


The line that believes Wayland really sucks forms to my left and crosses a few continents. :smiley:

Here are two Hail Mary attempts for you.

  1. Stuff your entire application into a Docker container that is running X11. Sometimes the glad-handing from Docker container to Weston works as expected. Depends on libraries and tools.

  2. While you are stuffed inside of the Docker container, create an invisible MainWindow in Full Screen mode. Theoretically you should be able to control the position of properly parented child dialogs if everything is a child parented by that full screen window.

Just a couple ideas off the top of my head.