Fix a pair of crashes

This commit is contained in:
bluepython508
2026-03-31 16:35:53 +01:00
parent e6fc901c26
commit cf2f38c75a

View File

@@ -421,10 +421,11 @@
(defn window/render [window]
(when (and (not (window :x)) (window :w))
(def output ((window :parent) :output))
(window/set-position
window
(+ (output :x) (div (- (output :w) (window :w)) 2))
(+ (output :y) (div (- (output :h) (window :h)) 2))))
(when output
(window/set-position
window
(+ (output :x) (div (- (output :w) (window :w)) 2))
(+ (output :y) (div (- (output :h) (window :h)) 2)))))
(if (find |(= ($ :focused) window) (wm :seats))
(set-borders window :focused)
(set-borders window :normal)))
@@ -517,7 +518,7 @@
(defn action/toggle-fullscreen [inform]
(fn [seat binding]
(def window (seat :focused))
(if (window :fullscreen)
(if (and window (window :fullscreen))
(window/exit-fullscreen window inform)
(window/enter-fullscreen window inform))))
@@ -638,7 +639,8 @@
"floating-terminal" (rule/pulldown)
"floating-repl" (rule/pulldown)
"floating-htop" (rule/pulldown)
"steam" (rule/float false)})
"steam" (rule/float false)
"io.github.alainm23.planify.quick-add" (rule/float true)})
(defn startup []