[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm 4c9afc2 16/19: Adapt dynamic workspace for floatin
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm 4c9afc2 16/19: Adapt dynamic workspace for floating module |
Date: |
Tue, 19 Jul 2016 03:07:08 +0000 (UTC) |
branch: externals/exwm
commit 4c9afc25b322d30b21eeea2cf3af7def0fc1dbb4
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Adapt dynamic workspace for floating module
* exwm-workspace.el (exwm-workspace--add-frame-as-workspace):
Fix the checking criteria of floating frames; Copy RandR frame
parameters from the first workspace frame (rather than the selected one
which can be a floating frame).
* exwm-workspace.el (exwm-workspace--remove-frame-as-workspace):
Check frame type first.
---
exwm-workspace.el | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 0843c27..36502a2 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -981,7 +981,10 @@ INDEX must not exceed the current number of workspaces."
frame
(frame-parameter frame 'display)
(slot-value exwm--connection 'display)))
- ((frame-parameter frame 'exwm-floating)
+ ((frame-parameter frame 'unsplittable)
+ ;; We create floating frames with the "unsplittable" parameter set.
+ ;; Though it may not be a floating frame, we won't treat an
+ ;; unsplittable frame as a workspace anyway.
(exwm--log "Frame `%s' is floating" frame))
(t
(exwm--log "Adding frame `%s' as workspace" frame)
@@ -995,12 +998,13 @@ INDEX must not exceed the current number of workspaces."
(set-frame-parameter frame 'exwm-outer-id outer-id)
(set-frame-parameter frame 'exwm-container container)
(set-frame-parameter frame 'exwm-workspace workspace)
- ;; Use same RandR output and geometry as previous workspace.
- (let ((prev-workspace (selected-frame)))
+ ;; Copy RandR frame parameters from the first workspace to
+ ;; prevent potential problems. The values do not matter here as
+ ;; they'll be updated by the RandR module later.
+ (let ((w (car exwm-workspace--list)))
(dolist (param '(exwm-randr-output
exwm-geometry))
- (set-frame-parameter frame param
- (frame-parameter prev-workspace param))))
+ (set-frame-parameter frame param (frame-parameter w param))))
(xcb:+request exwm--connection
(make-instance 'xcb:CreateWindow
:depth 0 :wid workspace :parent exwm--root
@@ -1056,10 +1060,12 @@ INDEX must not exceed the current number of workspaces."
(defun exwm-workspace--remove-frame-as-workspace (frame)
"Stop treating frame FRAME as a workspace."
(cond
- ((= 1 (exwm-workspace--count))
- (exwm--log "Cannot remove last workspace"))
((not (exwm-workspace--workspace-p frame))
(exwm--log "Frame `%s' is not a workspace" frame))
+ ((= 1 (exwm-workspace--count))
+ ;; FIXME: When using dedicated minibuffer frame, deleting the last
+ ;; frame hangs Emacs.
+ (user-error "[EXWM] Cannot remove last workspace"))
(t
(exwm--log "Removing frame `%s' as workspace" frame)
(let* ((index (exwm-workspace--position frame))
- [elpa] externals/exwm cd1372e 03/19: Apply minibuffer in own frame configuration to created frames, (continued)
- [elpa] externals/exwm cd1372e 03/19: Apply minibuffer in own frame configuration to created frames, Chris Feng, 2016/07/18
- [elpa] externals/exwm d0797d0 13/19: Remove `exwm-worspace-number', Chris Feng, 2016/07/18
- [elpa] externals/exwm 18fc95d 01/19: Minor cleanup, Chris Feng, 2016/07/18
- [elpa] externals/exwm 983fd46 02/19: Add missing declarations, Chris Feng, 2016/07/18
- [elpa] externals/exwm 35e1655 07/19: Move defvars to the top, Chris Feng, 2016/07/18
- [elpa] externals/exwm e491118 10/19: Support swapping workspaces, Chris Feng, 2016/07/18
- [elpa] externals/exwm 8e2da00 05/19: Add helper for counting number of workspaces, Chris Feng, 2016/07/18
- [elpa] externals/exwm 2de2d42 09/19: Factor out prompt for workspace, Chris Feng, 2016/07/18
- [elpa] externals/exwm b51f3e6 18/19: Mention dynamic workspace in various places, Chris Feng, 2016/07/18
- [elpa] externals/exwm 2ebeec1 17/19: Adapt dynamic workspace for RandR module, Chris Feng, 2016/07/18
- [elpa] externals/exwm 4c9afc2 16/19: Adapt dynamic workspace for floating module,
Chris Feng <=
- [elpa] externals/exwm 622618a 15/19: Improve the handling of workspaces, Chris Feng, 2016/07/18
- [elpa] externals/exwm 73d890a 14/19: Fix various minor issues, Chris Feng, 2016/07/18
- [elpa] externals/exwm 07120a0 08/19: Work with workspace frames instead of indices, Chris Feng, 2016/07/18
- [elpa] externals/exwm 0fbc725 12/19: Support adding and removing workspaces, Chris Feng, 2016/07/18
- [elpa] externals/exwm b409d87 19/19: Merge branch 'medranocalvo/dynamic-workspaces' into externals/exwm, Chris Feng, 2016/07/18