nyxt
nyxt copied to clipboard
Foreign interface of `ffi-window-fullscreen` and `ffi-window-maximize`
In the context of #3435, I noticed that ffi-window-{un,}maximize could be greatly simplified. Instead of defining two generics, there could be a single one that gets the maximized state of the window and a setf method that mutates it.
The same reasoning holds for ffi-window-fullscreen.
To get the fullscreen state:
(gdk:gdk-window-get-state (gtk:gtk-widget-window (nyxt/renderer/gtk::gtk-object window)))
To get the maximized state (either as above or):
(gtk:gtk-window-is-maximized (nyxt/renderer/gtk::gtk-object window))
I believe this will greatly simplify the architecture. I find it extremely odd that this strategy wasn't taken from day 1.