Closed fmoralesc closed 7 years ago
Mutter 3.22.2 fixes "various placement issues on wayland", see https://mail.gnome.org/archives/gnome-shell-list/2016-November/msg00002.html
Can you try if this still happens?
I just tried with 3.22.3 and it still happens.
I can confirm that this also happens under Mutter 3.24.1
Since Wayland apparently does not support CENTER_ON_PARENT
at all (you can see the same issue in many GNOME core apps, e.g. the preference dialog in Gedit), I decided to make the popup window modal.
This matches the behavior of Atom's command palette and solves this and several other Wayland issues.
This seems to break placement of plotinus in Xorg, though :/
@fmoralesc: How? Modal windows work the same across Xorg and Wayland (at least all others do).
Can you provide a screenshot of what you are seeing?
I would have supposed so, but this is what I see...
It works perfectly in wayland, though (This is using mutter 3.24.1)
What desktop is this?
What happens when you open a standard modal dialog (e.g. Nautilus' "About" dialog)?
This is Gnome 3.24.
The 'About' dialog is centered. I also considered whether something in my config was wrong... (There is the /org/gnome/mutter/attach-modal-dialogs key that could affect this, but it doesn't seem to make any difference here...)
Does adding back the line
window_position = Gtk.WindowPosition.CENTER_ON_PARENT;
that was removed by the commit fix the issue?
I also notice a font issue in your first screenshot. The arrow symbol that is used to separate menu hierarchy levels appears to have been substituted by a placeholder of sorts. What is your UI font?
Beautiful desktop, by the way! 👍
(Thanks!) My UI font is Roboto (the Android font). With DejaVu Sans I get a clearer arrow (in Roboto it is an arrow surrounded by a circle).
With that line, it improves, I get
It still doesn't seem to behave as a modal window.
Looks like this needs deeper investigation. I hope this doesn't indicate a limitation for GTK+ modules somehow. The placement is weird, it's vertically centered but not horizontally.
Thank you very much for your help so far!
No problem, thanks to you for this software!
@fmoralesc: The Xorg issue is now fixed!
This was a tough nut to crack. Eventually I noticed that the problem disappeared when I made PopupWindow
inherit from Gtk.Dialog
instead of Gtk.Window
(though that introduced other problems). In https://github.com/GNOME/gtk/blob/master/gtk/ui/gtkdialog.ui I then found the key missing property:
type_hint = Gdk.WindowTypeHint.DIALOG;
Of course, the whole thing still reeks of a GTK+ bug, but at least it's working now in both Wayland and X11!
Awesome! I can confirm it is fixed now. Thanks!
It seems like Gtk can't handle the parenting of the window properly.