From 650ed0013c3fac9e88328086d1f4a029f4fb7221 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Tue, 12 Jul 2016 18:35:51 +0800 Subject: 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. --- exwm-manage.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'exwm-manage.el') diff --git a/exwm-manage.el b/exwm-manage.el index 3dcdf795b6..924103e535 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)) -- cgit 1.4.1