Check for _NET_WM_STATE_FULLSCREEN on managing
* exwm-core.el (exwm--fullscreen): Removed. (exwm--ewmh-state): New variable for recording the _NET_WM_STATE hint. * exwm-core.el (exwm-mode-menu, exwm-mode-map): * exwm-layout.el (exwm-layout-set-fullscreen) (exwm-layout-unset-fullscreen): * exwm-manage.el (exwm-manage--unmanage-window) (exwm-manage--on-ConfigureRequest): * exwm-workspace.el (exwm-workspace-switch, exwm-workspace-swap) (exwm-workspace-move): * exwm.el (exwm-reset, exwm--on-ClientMessage): Use the new variable. * exwm-manage.el (exwm-manage--update-ewmh-state): New function for updating _NET_WM_STATE. (exwm-manage--manage-window): Update _NET_WM_STATE and check for _NET_WM_STATE_FULLSCREEN.
This commit is contained in:
parent
e4ecd79210
commit
ebcc9591f3
5 changed files with 49 additions and 18 deletions
14
exwm.el
14
exwm.el
|
|
@ -78,7 +78,8 @@
|
|||
(interactive)
|
||||
(with-current-buffer (window-buffer)
|
||||
(when (eq major-mode 'exwm-mode)
|
||||
(when exwm--fullscreen (exwm-layout-unset-fullscreen))
|
||||
(when (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state)
|
||||
(exwm-layout-unset-fullscreen))
|
||||
;; Force refresh
|
||||
(exwm-layout--refresh)
|
||||
(call-interactively #'exwm-input-grab-keyboard))))
|
||||
|
|
@ -464,12 +465,17 @@
|
|||
(when (or (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN props)
|
||||
(memq xcb:Atom:_NET_WM_STATE_ABOVE props))
|
||||
(cond ((= action xcb:ewmh:_NET_WM_STATE_ADD)
|
||||
(unless exwm--fullscreen (exwm-layout-set-fullscreen id))
|
||||
(unless (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN
|
||||
exwm--ewmh-state)
|
||||
(exwm-layout-set-fullscreen id))
|
||||
(push xcb:Atom:_NET_WM_STATE_FULLSCREEN props-new))
|
||||
((= action xcb:ewmh:_NET_WM_STATE_REMOVE)
|
||||
(when exwm--fullscreen (exwm-layout-unset-fullscreen id)))
|
||||
(when (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN
|
||||
exwm--ewmh-state)
|
||||
(exwm-layout-unset-fullscreen id)))
|
||||
((= action xcb:ewmh:_NET_WM_STATE_TOGGLE)
|
||||
(if exwm--fullscreen
|
||||
(if (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN
|
||||
exwm--ewmh-state)
|
||||
(exwm-layout-unset-fullscreen id)
|
||||
(exwm-layout-set-fullscreen id)
|
||||
(push xcb:Atom:_NET_WM_STATE_FULLSCREEN props-new)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue