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
|
|
@ -445,7 +445,9 @@ PREFIX-DIGITS is a list of the digits introduced so far."
|
|||
The optional FORCE option is for internal use only."
|
||||
(interactive
|
||||
(list
|
||||
(unless (and (eq major-mode 'exwm-mode) exwm--fullscreen) ;it's invisible
|
||||
(unless (and (eq major-mode 'exwm-mode)
|
||||
;; The prompt is invisible in fullscreen mode.
|
||||
(memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state))
|
||||
(let ((exwm-workspace--prompt-add-allowed t)
|
||||
(exwm-workspace--prompt-delete-allowed t))
|
||||
(exwm-workspace--prompt-for-workspace "Switch to [+/-]: ")))))
|
||||
|
|
@ -463,7 +465,8 @@ The optional FORCE option is for internal use only."
|
|||
:value-mask xcb:ConfigWindow:StackMode
|
||||
:stack-mode xcb:StackMode:Above))
|
||||
;; Raise X windows with struts set if there's no fullscreen X window.
|
||||
(unless (buffer-local-value 'exwm--fullscreen (window-buffer window))
|
||||
(unless (with-current-buffer (window-buffer window)
|
||||
(memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state))
|
||||
(dolist (pair exwm-workspace--id-struts-alist)
|
||||
(xcb:+request exwm--connection
|
||||
(make-instance 'xcb:ConfigureWindow
|
||||
|
|
@ -537,7 +540,9 @@ deleted, moved, etc).")
|
|||
(defun exwm-workspace-swap (workspace1 workspace2)
|
||||
"Interchange position of WORKSPACE1 with that of WORKSPACE2."
|
||||
(interactive
|
||||
(unless (and (eq major-mode 'exwm-mode) exwm--fullscreen) ;it's invisible
|
||||
(unless (and (eq major-mode 'exwm-mode)
|
||||
;; The prompt is invisible in fullscreen mode.
|
||||
(memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state))
|
||||
(let (w1 w2)
|
||||
(let ((exwm-workspace--prompt-add-allowed t)
|
||||
(exwm-workspace--prompt-delete-allowed t))
|
||||
|
|
@ -572,7 +577,9 @@ deleted, moved, etc).")
|
|||
When called interactively, prompt for a workspace and move current one just
|
||||
before it."
|
||||
(interactive
|
||||
(unless (and (eq major-mode 'exwm-mode) exwm--fullscreen) ;it's invisible
|
||||
(unless (and (eq major-mode 'exwm-mode)
|
||||
;; The prompt is invisible in fullscreen mode.
|
||||
(memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state))
|
||||
(list exwm-workspace--current
|
||||
(exwm-workspace--position
|
||||
(exwm-workspace--prompt-for-workspace "Move workspace to: ")))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue