Handle focus changes correctly on lock - refocus the "focused" window
This commit is contained in:
@@ -211,12 +211,11 @@
|
|||||||
|
|
||||||
(defn seat/focus [seat window]
|
(defn seat/focus [seat window]
|
||||||
(defn focus-window [window]
|
(defn focus-window [window]
|
||||||
(unless (= (seat :focused) window)
|
|
||||||
(:focus-window (seat :obj) (window :obj))
|
(:focus-window (seat :obj) (window :obj))
|
||||||
(put seat :focused window)
|
(put seat :focused window)
|
||||||
(set (wm :render-order) (filter |(not (= $ window)) (wm :render-order)))
|
(set (wm :render-order) (filter |(not (= $ window)) (wm :render-order)))
|
||||||
(array/push (wm :render-order) window)
|
(array/push (wm :render-order) window)
|
||||||
(:place-top (window :node))))
|
(:place-top (window :node)))
|
||||||
(defn clear-focus []
|
(defn clear-focus []
|
||||||
(when (seat :focused)
|
(when (seat :focused)
|
||||||
(:clear-focus (seat :obj))
|
(:clear-focus (seat :obj))
|
||||||
@@ -287,6 +286,9 @@
|
|||||||
(if (or (not (seat :focused-output)) ((seat :focused-output) :removed))
|
(if (or (not (seat :focused-output)) ((seat :focused-output) :removed))
|
||||||
(seat/focus-output seat (first (wm :outputs))))
|
(seat/focus-output seat (first (wm :outputs))))
|
||||||
|
|
||||||
|
(when (not= (seat :layer-focus) :non-exclusive)
|
||||||
|
(seat/focus seat (seat :focused)))
|
||||||
|
|
||||||
(seat/focus seat nil)
|
(seat/focus seat nil)
|
||||||
|
|
||||||
(if-let [window (seat :window-interaction)]
|
(if-let [window (seat :window-interaction)]
|
||||||
|
|||||||
Reference in New Issue
Block a user