diff --git a/configs/releng/airootfs/usr/local/bin/fws-hello b/configs/releng/airootfs/usr/local/bin/fws-hello index c286925..0891730 100755 --- a/configs/releng/airootfs/usr/local/bin/fws-hello +++ b/configs/releng/airootfs/usr/local/bin/fws-hello @@ -16,7 +16,12 @@ import sys import gi gi.require_version("Gtk", "3.0") -from gi.repository import Gtk # noqa: E402 +gi.require_version("Gdk", "3.0") # sinon gi charge Gdk 4.0 (conflit avec Gtk3) +from gi.repository import Gdk, GLib, Gtk # noqa: E402 + +# WM_CLASS déterministe : les règles i3/Hyprland « fenêtre flottante » +# ciblent cette classe. +GLib.set_prgname("fws-hello") _FLAG = os.path.expanduser("~/.config/fws/hello-done") @@ -69,6 +74,11 @@ class HelloWindow(Gtk.Window): self.set_default_size(460, -1) self.set_position(Gtk.WindowPosition.CENTER) self.set_border_width(18) + # DIALOGUE : les tuileurs (i3/Hyprland) laissent les dialogues en + # flottant → la fenêtre garde sa taille naturelle au lieu d'être + # étirée sur tout l'espace de travail (layout illisible sinon). + self.set_type_hint(Gdk.WindowTypeHint.DIALOG) + self.set_resizable(False) box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) self.add(box)