[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm 2ebeec1 17/19: Adapt dynamic workspace for RandR m
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm 2ebeec1 17/19: Adapt dynamic workspace for RandR module |
Date: |
Tue, 19 Jul 2016 03:07:08 +0000 (UTC) |
branch: externals/exwm
commit 2ebeec12570636e673d08c8b4d47e12ce0da048b
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Adapt dynamic workspace for RandR module
* exwm-workspace.el (exwm-workspace-list-change-hook):
New hook run when the workspace list is modified.
* exwm-randr.el (exwm-randr--init, exwm-randr--exit):
* exwm-workspace.el (exwm-workspace-swap, exwm-workspace-move)
(exwm-workspace--add-frame-as-workspace)
(exwm-workspace--remove-frame-as-workspace):
Use it.
---
exwm-randr.el | 6 ++++--
exwm-workspace.el | 15 +++++++++++----
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/exwm-randr.el b/exwm-randr.el
index ac3341d..709469a 100644
--- a/exwm-randr.el
+++ b/exwm-randr.el
@@ -154,10 +154,12 @@
;; xcb:randr:NotifyMask:OutputProperty
;; xcb:randr:NotifyMask:CrtcChange))
))
- (xcb:flush exwm--connection)))))
+ (xcb:flush exwm--connection)
+ (add-hook 'exwm-workspace-list-change-hook #'exwm-randr--refresh)))))
(defun exwm-randr--exit ()
- "Exit the RandR module.")
+ "Exit the RandR module."
+ (remove-hook 'exwm-workspace-list-change-hook #'exwm-randr--refresh))
(defun exwm-randr-enable ()
"Enable RandR support for EXWM."
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 36502a2..d575058 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -449,6 +449,9 @@ The optional FORCE option is for internal use only."
(xcb:flush exwm--connection))
(run-hooks 'exwm-workspace-switch-hook)))
+(defvar exwm-workspace-list-change-hook nil
+ "Normal hook run when the workspace list is changed (workspace added,
+deleted, moved, etc).")
;;;###autoload
(defun exwm-workspace-swap (workspace1 workspace2)
@@ -476,7 +479,8 @@ The optional FORCE option is for internal use only."
;; With the current workspace involved, lots of stuffs need refresh.
(set-frame-parameter exwm-workspace--current 'exwm-selected-window
(selected-window))
- (exwm-workspace-switch exwm-workspace--current t)))))
+ (exwm-workspace-switch exwm-workspace--current t))
+ (run-hooks 'exwm-workspace-list-change-hook))))
;;;###autoload
(defun exwm-workspace-move (workspace nth)
@@ -511,7 +515,8 @@ before it."
;; With the current workspace involved, lots of stuffs need refresh.
(set-frame-parameter exwm-workspace--current 'exwm-selected-window
(selected-window))
- (exwm-workspace-switch exwm-workspace--current t)))))
+ (exwm-workspace-switch exwm-workspace--current t))
+ (run-hooks 'exwm-workspace-list-change-hook))))
;;;###autoload
(defun exwm-workspace-add (&optional index)
@@ -1055,7 +1060,8 @@ INDEX must not exceed the current number of workspaces."
'fullscreen 'fullboth)))
;; Update EWMH properties.
(exwm-workspace--update-ewmh-props)
- (exwm-workspace-switch frame t))))
+ (exwm-workspace-switch frame t)
+ (run-hooks 'exwm-workspace-list-change-hook))))
(defun exwm-workspace--remove-frame-as-workspace (frame)
"Stop treating frame FRAME as a workspace."
@@ -1096,7 +1102,8 @@ INDEX must not exceed the current number of workspaces."
;; Update EWMH properties.
(exwm-workspace--update-ewmh-props)
;; Update switch history.
- (setq exwm-workspace--switch-history-outdated t))))
+ (setq exwm-workspace--switch-history-outdated t)
+ (run-hooks 'exwm-workspace-list-change-hook))))
(defun exwm-workspace--update-ewmh-props ()
"Update EWMH properties to match the workspace list."
- [elpa] externals/exwm 9018545 06/19: New function exwm-workspace--workspace-p, (continued)
- [elpa] externals/exwm 9018545 06/19: New function exwm-workspace--workspace-p, Chris Feng, 2016/07/18
- [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 <=
- [elpa] externals/exwm 4c9afc2 16/19: Adapt dynamic workspace for floating module, Chris Feng, 2016/07/18
- [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