about summary refs log tree commit diff
path: root/exwm-randr.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-07-13T10·51+0800
committerChris Feng <chris.w.feng@gmail.com>2016-07-13T11·36+0800
commit6c8255bf3978a4df3d76ffd6f7d6bbdbba8bba19 (patch)
treed48859b6a960edfb29ab9e6f623b1401ad337500 /exwm-randr.el
parenteee5c6fa4dd776c1604e5ec7db34bc5401d8dea6 (diff)
Add/improve some ICCCM/EWMH features
* exwm-floating.el (exwm-floating--set-allowed-actions)
(exwm-floating--set-floating, exwm-floating--unset-floating):
Add _NET_WM_ALLOWED_ACTIONS support.

* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--unset-floating): Support initial state hint.
* exwm.el (exwm--update-hints): Fetch initial state.
(exwm--update-state, exwm--on-PropertyNotify):
WM_STATE is not intended to be read.
* exwm-core.el (exwm-state):
* exwm-floating.el (exwm-floating-hide):
* exwm-input.el (exwm-input--update-focus):
* exwm-layout.el (exwm-layout--set-state)
(exwm-layout--iconic-state-p, exwm-layout--show, exwm-layout--hide):
* exwm-manage.el (exwm-manage--on-MapRequest):
Improve WM_STATE support.

* exwm-input.el (exwm-input--set-focus):
* exwm-input.el (exwm-input--update-focus)
(exwm-input--set-active-window):
* exwm.el (exwm--on-ClientMessage): Add _NET_ACTIVE_WINDOW support.

* exwm-layout.el (exwm-layout--set-client-list-stacking):
Improve _NET_CLIENT_LIST_STACKING support.

* exwm-manage.el (exwm-manage--set-client-list)
(exwm-manage--manage-window, exwm-manage--unmanage-window):
Improve _NET_CLIENT_LIST support.

* exwm-manage.el (exwm-manage--manage-window):
* exwm-workspace.el (exwm-workspace--set-desktop)
(exwm-workspace-move-window):
* exwm.el (exwm--on-ClientMessage): Add _NET_WM_DESKTOP support.

* exwm-randr.el (exwm-randr--refresh):
* exwm-workspace.el (exwm-workspace--set-desktop-geometry)
(exwm-workspace--init): Add _NET_DESKTOP_GEOMETRY support.

* exwm-workspace.el (exwm-workspace--set-desktop-geometry):
Renamed from `exwm-workspace--update-desktop-geometry'.
* exwm-randr.el (exwm-randr--refresh): Improve _NET_WORKAREA support.

* exwm-workspace.el (exwm-workspace--set-fullscreen):
Correct variables names.

* exwm-workspace.el (exwm-workspace--init):
* exwm.el (exwm--init-icccm-ewmh):
Set _NET_NUMBER_OF_DESKTOPS in workspace module.

* exwm-workspace.el (exwm-workspace--init):
* exwm.el (exwm--init-icccm-ewmh):
Set _NET_DESKTOP_VIEWPORT in workspace module.

* exwm.el (exwm--on-ClientMessage): Improve _NET_CURRENT_DESKTOP
support.

* exwm.el (exwm--on-ClientMessage): Add _NET_CLOSE_WINDOW support.

* exwm.el (exwm--on-ClientMessage): Add WM_CHANGE_STATE support.

* exwm.el (exwm--init-icccm-ewmh): Update supported atoms.
Diffstat (limited to 'exwm-randr.el')
-rw-r--r--exwm-randr.el21
1 files changed, 8 insertions, 13 deletions
diff --git a/exwm-randr.el b/exwm-randr.el
index d30f68778986..f71120a4bb36 100644
--- a/exwm-randr.el
+++ b/exwm-randr.el
@@ -59,13 +59,13 @@
 (defvar exwm-workspace--list)
 
 (declare-function exwm-workspace--set-fullscreen "exwm-workspace.el" (frame))
-(declare-function exwm-workspace--update-workareas "exwm-workspace.el"
+(declare-function exwm-workspace--set-workareas "exwm-workspace.el"
                   (&optional workareas))
+(declare-function exwm-workspace--set-desktop-geometry "exwm-workspace.el" ())
 
 (defun exwm-randr--refresh ()
   "Refresh workspaces according to the updated RandR info."
-  (let (output-name geometry output-plist default-geometry workareas
-                    viewports)
+  (let (output-name geometry output-plist default-geometry workareas)
     ;; Query all outputs
     (with-slots (config-timestamp outputs)
         (xcb:+request-unchecked+reply exwm--connection
@@ -107,16 +107,11 @@
           (set-frame-parameter frame 'exwm-geometry geometry)
           (exwm-workspace--set-fullscreen frame)
           (with-slots (x y width height) geometry
-            (setq workareas
-                  (nconc workareas (list x y width height))
-                  viewports (nconc viewports (list x y))))))
-      ;; Update _NET_WORKAREA
-      (exwm-workspace--update-workareas (vconcat workareas))
-      ;; Update _NET_DESKTOP_VIEWPORT
-      (xcb:+request exwm--connection
-          (make-instance 'xcb:ewmh:set-_NET_DESKTOP_VIEWPORT
-                         :window exwm--root
-                         :data (vconcat viewports)))
+            (setq workareas (nconc workareas (list x y width height))))))
+      ;; Set _NET_DESKTOP_GEOMETRY.
+      (exwm-workspace--set-desktop-geometry)
+      ;; Set _NET_WORKAREA.
+      (exwm-workspace--set-workareas (vconcat workareas))
       (xcb:flush exwm--connection)
       (run-hooks 'exwm-randr-refresh-hook))))