Support for centering dialog boxes on main window
I have a GTK (v3.24.14) program running on Weston (v8.0.0, desktop-shell). My main window is maximized, and that works correctly. However, when I open a dialog box, the dialog is positioned at random in different locations on the display every time. This pretty obviously leads to a terrible user experience (go hunting for the dialog every time). I've tried using the gtk_window_set_position
function to place the dialog popup intelligently (either centered on the screen or centered on the main window, which would be equivalent), but it has no effect. It's my understanding that in general Wayland/Weston don't support specifying window positions, which is fine for the main window in an application, but terrible for pop-ups or other secondary windows.
Is there any way I can achieve consistent placement of my popup window, short of forking Wayland and making some major code changes? And if there isn't, can you explain the rationale for not allowing one program to position it's windows consistently relative to each other?