Hi,
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.
Welcome,
The line that believes Wayland really sucks forms to my left and crosses a few continents. 
Here are two Hail Mary attempts for you.
-
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.
-
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.
Hi mohithmanoj
Did you solve this? And if so, what solved it?
Just started investigating a similar issue related to Wayland, but using Qt. Pop-ups ending up in random places.
Hi kristofer,
Nope, the problem remains. Unfortunately the solution from seasoned_geek was not practical in my application. As a temporary solution I changed the root container of the window into a Gtk::Overlay and implemented custom ‘Dialog’ like objects over it. Message boxes are still at the lords mercy.
From what I hear, Qt has it’s own implementation of Wayland which should have handled this.
Did you solve this? Could you please share the details?
I am facing the same issue.
Unfortunately no… As a matter of fact it has escalated to application crashes, probably originating at Weston level. I had some of the Gtk::MessageDialog
s instances remaining in the code and during testing we found that the application crashes while closing the message dialog, that too randomly. As of today I have removed all Gtk::Dialog
and its derivatives from the my code and replaced with a ‘look-alike’ that utilizes a Gtk::Overlay
added to the main window… and my jaw still hurts from the time I was mad at this behavior.