Fix a pair of crashes
This commit is contained in:
@@ -421,10 +421,11 @@
|
|||||||
(defn window/render [window]
|
(defn window/render [window]
|
||||||
(when (and (not (window :x)) (window :w))
|
(when (and (not (window :x)) (window :w))
|
||||||
(def output ((window :parent) :output))
|
(def output ((window :parent) :output))
|
||||||
|
(when output
|
||||||
(window/set-position
|
(window/set-position
|
||||||
window
|
window
|
||||||
(+ (output :x) (div (- (output :w) (window :w)) 2))
|
(+ (output :x) (div (- (output :w) (window :w)) 2))
|
||||||
(+ (output :y) (div (- (output :h) (window :h)) 2))))
|
(+ (output :y) (div (- (output :h) (window :h)) 2)))))
|
||||||
(if (find |(= ($ :focused) window) (wm :seats))
|
(if (find |(= ($ :focused) window) (wm :seats))
|
||||||
(set-borders window :focused)
|
(set-borders window :focused)
|
||||||
(set-borders window :normal)))
|
(set-borders window :normal)))
|
||||||
@@ -517,7 +518,7 @@
|
|||||||
(defn action/toggle-fullscreen [inform]
|
(defn action/toggle-fullscreen [inform]
|
||||||
(fn [seat binding]
|
(fn [seat binding]
|
||||||
(def window (seat :focused))
|
(def window (seat :focused))
|
||||||
(if (window :fullscreen)
|
(if (and window (window :fullscreen))
|
||||||
(window/exit-fullscreen window inform)
|
(window/exit-fullscreen window inform)
|
||||||
(window/enter-fullscreen window inform))))
|
(window/enter-fullscreen window inform))))
|
||||||
|
|
||||||
@@ -638,7 +639,8 @@
|
|||||||
"floating-terminal" (rule/pulldown)
|
"floating-terminal" (rule/pulldown)
|
||||||
"floating-repl" (rule/pulldown)
|
"floating-repl" (rule/pulldown)
|
||||||
"floating-htop" (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 []
|
(defn startup []
|
||||||
|
|||||||
Reference in New Issue
Block a user