Setting a default window size for a resizable will make it exceed screen bounds on Wayland and make it hard to deal with as a user
Setting a default window size for a resizable will make it exceed screen bounds when using a Wayland session, and this makes it hard to deal with as a user since resizing such an overly large window can require 3+ clicks in different spots:
#!/usr/bin/python3
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
win = Gtk.Window()
win.set_default_size(500, 3000)
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main()
Having the app solve this seems fairly complicated, due to DPI scalers, multiple screens, not knowing which screen it will even spawn on, and so on. Also see KWin discussion, which suggests this should perhaps be addressed in the toolkit, which e.g. SDL2 has done so. I think the intention of a default window size for most apps would be to spawn at that size if it fits the screen and not at all cost if the window is resizable.
Affected GTK+ version: 4.16.7 apparently above example uses 3.24.43
Screenshot:
Edited by Ellie