From 4ad76b879d2f3807828de5345d5da4cac301415d Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Thu, 24 Sep 2015 20:03:57 +0800 Subject: Fix a calculation error of the position of a floating frame * exwm-floating.el (exwm-floating--set-floating): The position of a floating frame should be relative to its workspace. --- exwm-floating.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'exwm-floating.el') diff --git a/exwm-floating.el b/exwm-floating.el index 924f7cffca9f..0994cb9914cc 100644 --- a/exwm-floating.el +++ b/exwm-floating.el @@ -135,8 +135,8 @@ (setq edges nil))) (if edges ;; Put at the center of leading window - (setq x (/ (- (+ (elt edges 2) (elt edges 0)) width) 2) - y (/ (- (+ (elt edges 3) (elt edges 1)) height) 2)) + (setq x (/ (- (elt edges 2) (elt edges 0) width) 2) + y (/ (- (elt edges 3) (elt edges 1) height) 2)) ;; Put at the center of screen (setq x (/ (- display-width width) 2) y (/ (- display-height height) 2)))))) -- cgit 1.4.1