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-12T10·35+0800
committerChris Feng <chris.w.feng@gmail.com>2016-07-12T10·35+0800
commit650ed0013c3fac9e88328086d1f4a029f4fb7221 (patch)
treee737fa39af0a669502fa9fd93fdc7083ea519968 /exwm-randr.el
parent0863f4149062089abdadd0dd795ad17d0e73da03 (diff)
Add initial support for dock (panel) applications
* exwm-layout.el (exwm-layout--fullscreen-frame-count)
(exwm-layout--set-frame-fullscreen): Moved to workspace module.
* exwm-workspace.el (exwm-workspace--fullscreen-frame-count)
(exwm-workspace--set-fullscreen):
Moved from layout module.

* exwm-manage.el (exwm-manage--manage-window):
Update struts for dock applications.
* exwm-workspace.el (exwm-workspace--strut)
(exwm-workspace--strut-is-partial): New variables for storing struts.
(exwm-workspace--resize-minibuffer-frame)
(exwm-workspace--on-ConfigureNotify): Take struts into consideration.
* exwm.el (exwm--update-strut-legacy, exwm--update-strut-partial)
(exwm--update-strut): New functions for updating _NET_WM_STRUT
or _NET_WM_STRUT_PARTIAL.
(exwm--on-PropertyNotify): Update struts on corresponding event.
(exwm--init-icccm-ewmh): Declare _NET_WM_STRUT
and _NET_WM_STRUT_PARTIAL as supported.

* exwm-workspace.el (exwm-workspace--update-workareas):
Dedicated function for updating _NET_WORKAREA.
* exwm-randr.el (exwm-randr--refresh):
* exwm-workspace.el (exwm-workspace--init):
Use `exwm-workspace--update-workareas'.
* exwm.el (exwm--init-icccm-ewmh): Do not set _NET_WORKAREA here.
Diffstat (limited to 'exwm-randr.el')
-rw-r--r--exwm-randr.el22
1 files changed, 9 insertions, 13 deletions
diff --git a/exwm-randr.el b/exwm-randr.el
index 0e4469de6641..d30f68778986 100644
--- a/exwm-randr.el
+++ b/exwm-randr.el
@@ -54,16 +54,18 @@
 (defvar exwm-randr-refresh-hook nil
   "Normal hook run when the RandR module just refreshed.")
 
-(defvar exwm-layout--fullscreen-frame-count)
+(defvar exwm-workspace--fullscreen-frame-count)
 (defvar exwm-workspace-number)
 (defvar exwm-workspace--list)
 
-(declare-function exwm-layout--set-frame-fullscreen "exwm-layout.el" (frame))
+(declare-function exwm-workspace--set-fullscreen "exwm-workspace.el" (frame))
+(declare-function exwm-workspace--update-workareas "exwm-workspace.el"
+                  (&optional workareas))
 
 (defun exwm-randr--refresh ()
   "Refresh workspaces according to the updated RandR info."
   (let (output-name geometry output-plist default-geometry workareas
-                    workarea-offset viewports)
+                    viewports)
     ;; Query all outputs
     (with-slots (config-timestamp outputs)
         (xcb:+request-unchecked+reply exwm--connection
@@ -93,10 +95,7 @@
                 (setq default-geometry geometry)))))))
     (exwm--log "(randr) outputs: %s" output-plist)
     (when output-plist
-      (setq workarea-offset (if (exwm-workspace--minibuffer-own-frame-p)
-                                0
-                              (window-pixel-height (minibuffer-window))))
-      (setq exwm-layout--fullscreen-frame-count 0)
+      (setq exwm-workspace--fullscreen-frame-count 0)
       (dotimes (i exwm-workspace-number)
         (let* ((output (plist-get exwm-randr-workspace-output-plist i))
                (geometry (lax-plist-get output-plist output))
@@ -106,16 +105,13 @@
                   output nil))
           (set-frame-parameter frame 'exwm-randr-output output)
           (set-frame-parameter frame 'exwm-geometry geometry)
-          (exwm-layout--set-frame-fullscreen frame)
+          (exwm-workspace--set-fullscreen frame)
           (with-slots (x y width height) geometry
             (setq workareas
-                  (nconc workareas (list x y width (- height
-                                                      workarea-offset)))
+                  (nconc workareas (list x y width height))
                   viewports (nconc viewports (list x y))))))
       ;; Update _NET_WORKAREA
-      (xcb:+request exwm--connection
-          (make-instance 'xcb:ewmh:set-_NET_WORKAREA
-                         :window exwm--root :data (vconcat workareas)))
+      (exwm-workspace--update-workareas (vconcat workareas))
       ;; Update _NET_DESKTOP_VIEWPORT
       (xcb:+request exwm--connection
           (make-instance 'xcb:ewmh:set-_NET_DESKTOP_VIEWPORT