about summary refs log tree commit diff
path: root/exwm-manage.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-manage.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-manage.el')
-rw-r--r--exwm-manage.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/exwm-manage.el b/exwm-manage.el
index 3dcdf795b68e..924103e53596 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -79,6 +79,7 @@ corresponding buffer.")
 (declare-function exwm--update-hints "exwm.el" (id &optional force))
 (declare-function exwm--update-protocols "exwm.el" (id &optional force))
 (declare-function exwm--update-state "exwm.el" (id &optional force))
+(declare-function exwm--update-strut "exwm.el" (id))
 (declare-function exwm-floating--set-floating "exwm-floating.el" (id))
 (declare-function exwm-floating--unset-floating "exwm-floating.el" (id))
 
@@ -120,11 +121,19 @@ corresponding buffer.")
                       (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DIALOG
                             exwm-window-type))))
         (exwm--log "No need to manage #x%x" id)
+        ;; Update struts.
+        (when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DOCK exwm-window-type)
+          (exwm--update-strut id))
         ;; Remove all events
         (xcb:+request exwm--connection
             (make-instance 'xcb:ChangeWindowAttributes
                            :window id :value-mask xcb:CW:EventMask
-                           :event-mask xcb:EventMask:NoEvent))
+                           :event-mask
+                           (if (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DOCK
+                                     exwm-window-type)
+                               ;; Listen for change of struts property of dock.
+                               xcb:EventMask:PropertyChange
+                             xcb:EventMask:NoEvent)))
         ;; The window needs to be mapped
         (xcb:+request exwm--connection
             (make-instance 'xcb:MapWindow :window id))