[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm eb49e57 2/2: Fix hiding floating X windows
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm eb49e57 2/2: Fix hiding floating X windows |
Date: |
Fri, 13 Sep 2019 14:01:08 -0400 (EDT) |
branch: externals/exwm
commit eb49e57f762ab47e874c821c12e0b641d3dd9d8e
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Fix hiding floating X windows
* exwm-layout.el (exwm-layout--floating-hidden-position): A place far
enough from the origin to actually hide floating X window containers.
(exwm-layout--show, exwm-layout--hide): Use it.
---
exwm-layout.el | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/exwm-layout.el b/exwm-layout.el
index 5644dba..0b5adeb 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -40,6 +40,9 @@
"Non-nil to allow switching to buffers on other workspaces."
:type 'boolean)
+(defconst exwm-layout--floating-hidden-position -101
+ "Where to place hidden floating X windows.")
+
(defvar exwm-layout--other-buffer-exclude-buffers nil
"List of buffers that should not be selected by `other-buffer'.")
@@ -114,9 +117,8 @@
(when exwm--floating-frame-position
(setq frame-x (elt exwm--floating-frame-position 0)
frame-y (elt exwm--floating-frame-position 1)
- ;; The frame was placed at (-1, -1).
- x (+ x frame-x 1)
- y (+ y frame-y 1))
+ x (+ x frame-x (- exwm-layout--floating-hidden-position))
+ y (+ y frame-y (- exwm-layout--floating-hidden-position)))
(setq exwm--floating-frame-position nil))
(exwm--set-geometry (frame-parameter exwm--floating-frame
'exwm-container)
@@ -152,7 +154,10 @@
:drawable container))))
(setq exwm--floating-frame-position
(vector (slot-value geometry 'x) (slot-value geometry 'y)))
- (exwm--set-geometry container -1 -1 1 1)))
+ (exwm--set-geometry container exwm-layout--floating-hidden-position
+ exwm-layout--floating-hidden-position
+ 1
+ 1)))
(xcb:+request exwm--connection
(make-instance 'xcb:ChangeWindowAttributes
:window id :value-mask xcb:CW:EventMask