branch: externals/exwm
commit 6fbf4d168675c203ea7242b7ea6d5a9c53a62b9a
Author: Steven Allen <[email protected]>
Commit: Steven Allen <[email protected]>

    Fix check if the window is placed on the current workspace
    
    * exwm-floating.el (exwm-floating--set-floating): Make sure the window's
    mid-point is on the target screen.  (fixes #167)
---
 exwm-floating.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/exwm-floating.el b/exwm-floating.el
index 302a8d75a1..776dd440c2 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -274,14 +274,14 @@ configured dimension is invalid."
          ((> width screen-width)
           (setq x screen-x width screen-width))
          ;; Make sure at least half of the window is visible
-         ((> screen-x (+ x (/ width 2)) (+ screen-x screen-width))
+         ((not (< screen-x (+ x (/ width 2)) (+ screen-x screen-width)))
           (setq x (+ screen-x (/ (- screen-width width) 2)))))
         (cond
          ;; Too tall
          ((> height screen-height)
           (setq y screen-y height screen-height))
          ;; Make sure at least half of the window is visible
-         ((> screen-y (+ y (/ height 2)) (+ screen-y screen-height))
+         ((not (< screen-y (+ y (/ height 2)) (+ screen-y screen-height)))
           (setq y (+ screen-y (/ (- screen-height height) 2)))))
 
         ;; Apply user configuration.

Reply via email to