GTK 4: messagedialog "center to parent window"

Hi

In GTK 3 we could set any window (including a messagedialog) at the center of the screen.
I read on the forum this is removed in GTK 4.

Is there a way to set a messagedialog to the center of the parent?
Not to the center of the screen but the center of the parent.
I’m using a lot of messagedialogs and it’s silly they all appear top left of the screen, while the application window is somewhere else.

If this is not possible, could a setting 'center to parent window" be added in an update?
Or maybe this is not possible because any positioning code of a window is completely removed?

Thanks

Positioning windows is the job of the window manager, not the application. Most window manangers will try to position dialogs near their parent, so you need to set the transient-parent property on the dialog to point to the application’s window. If the window manager does not have a rule for that, then please open an issue on the window manager’s bug tracker.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.