Gtk4 window positioning and DES

I accept as a natural fact that the position of windows in Gtk4 could be established by desktop environment systems, especially rather the usage of gtk_window_set_position(…); but I don’t understand why the windows of my Gtkmm applications open at the topleft side of my screen while the preferences value of “Location of newly opened windows” is set to “Centre”.

Could be corrected ?

The component that specifies the position of newly opened windows is the compositor—i.e. GNOME Shell. If GNOME Shell is ignoring the setting, then it’s a bug in GNOME Shell.

Why the windows of other applications open correctly positioned (centered) but not mine ?

Note: I work under Cinnamon 3.8.8 and I think that the compositor is muffin.

It could be a race? Some delay when you’re building your UI that results on the position being reset. GTK does not specify a position, so the compositor is responsible for moving the window.

Then you should probably ask on a Cinnamon/Mint forum.

Nitpick: Window placement is done in mutter, not gnome-shell :slight_smile:

Welcome to Wayland!!! :wink:

Thank you.

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