Open dialogs near the parent
Expected:
When I create a dialog in my application I would like the window not to open on the other side of the screen. Ideally it would be near the parent window or even centered.
Actual:
When my app is in the bottom right of the screen the dialog opens in the top left.
Example code:
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
w = Gtk.Window()
b = Gtk.Button(label="click me")
def on_click(*args):
d = Gtk.Dialog()
d.get_content_area().add(Gtk.Label(label="Hi! I'm a dialog."))
d.set_transient_for(w)
d.show_all()
b.connect("clicked", on_click)
w.add(b)
w.show_all()
Gtk.main()