mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-30 16:07:59 +01:00
Fix fullscreen issues
* Correct ConfigureNotify events sent to fullscreen windows. * Exit fullscreen mode before switching workspace. * Temporarily treat `xcb:Atom:_NET_WM_STATE_ABOVE` as `xcb:Atom:_NET_WM_STATE_FULLSCREEN` since a) "plugin-container" (Flash Player) seems only set this, and b) it's not normally used by applications. This makes fullscreen videos working in e.g. iceweasel.
This commit is contained in:
parent
caf2feec63
commit
3fb90b9eaa
3 changed files with 16 additions and 6 deletions
|
@ -133,7 +133,7 @@ corresponding buffer.")
|
||||||
(exwm-input-grab-keyboard id)
|
(exwm-input-grab-keyboard id)
|
||||||
(exwm-workspace--update-switch-history)
|
(exwm-workspace--update-switch-history)
|
||||||
(setq exwm-input--focus-lock nil) ;unlocked in advance
|
(setq exwm-input--focus-lock nil) ;unlocked in advance
|
||||||
(with-current-buffer (exwm--id->buffer id)
|
(exwm--with-current-id id
|
||||||
(run-hooks 'exwm-manage-finish-hook))))
|
(run-hooks 'exwm-manage-finish-hook))))
|
||||||
(setq exwm-input--focus-lock nil))
|
(setq exwm-input--focus-lock nil))
|
||||||
|
|
||||||
|
@ -266,10 +266,14 @@ corresponding buffer.")
|
||||||
(with-slots (window x y width height border-width) obj
|
(with-slots (window x y width height border-width) obj
|
||||||
(if (setq buffer (exwm--id->buffer window))
|
(if (setq buffer (exwm--id->buffer window))
|
||||||
;; Send client message for managed windows
|
;; Send client message for managed windows
|
||||||
(progn
|
(with-current-buffer buffer
|
||||||
(setq edges (or (with-current-buffer buffer exwm--floating-edges)
|
(setq edges
|
||||||
|
(if exwm--fullscreen
|
||||||
|
(list 0 0
|
||||||
|
(x-display-pixel-width) (x-display-pixel-height))
|
||||||
|
(or exwm--floating-edges
|
||||||
(window-inside-absolute-pixel-edges
|
(window-inside-absolute-pixel-edges
|
||||||
(get-buffer-window buffer))))
|
(get-buffer-window)))))
|
||||||
(xcb:+request exwm--connection
|
(xcb:+request exwm--connection
|
||||||
(make-instance 'xcb:SendEvent
|
(make-instance 'xcb:SendEvent
|
||||||
:propagate 0 :destination window
|
:propagate 0 :destination window
|
||||||
|
|
|
@ -111,6 +111,11 @@ The optional FORCE option is for internal use only."
|
||||||
(unless (and (<= 0 index) (< index exwm-workspace-number))
|
(unless (and (<= 0 index) (< index exwm-workspace-number))
|
||||||
(user-error "[EXWM] Workspace index out of range: %d" index))
|
(user-error "[EXWM] Workspace index out of range: %d" index))
|
||||||
(when (or force (/= exwm-workspace-current-index index))
|
(when (or force (/= exwm-workspace-current-index index))
|
||||||
|
;; Exit fullscreen mode
|
||||||
|
(with-current-buffer (window-buffer)
|
||||||
|
(when (and (eq major-mode 'exwm-mode) exwm--fullscreen)
|
||||||
|
(exwm-layout-unset-fullscreen)
|
||||||
|
(exwm-input-grab-keyboard)))
|
||||||
(let ((frame (elt exwm-workspace--list index)))
|
(let ((frame (elt exwm-workspace--list index)))
|
||||||
(setq exwm-workspace--current frame
|
(setq exwm-workspace--current frame
|
||||||
exwm-workspace-current-index index)
|
exwm-workspace-current-index index)
|
||||||
|
|
3
exwm.el
3
exwm.el
|
@ -462,7 +462,8 @@
|
||||||
(exwm-floating--set-floating id)
|
(exwm-floating--set-floating id)
|
||||||
(push xcb:Atom:_NET_WM_STATE_MODAL props-new)))))
|
(push xcb:Atom:_NET_WM_STATE_MODAL props-new)))))
|
||||||
;; _NET_WM_STATE_FULLSCREEN
|
;; _NET_WM_STATE_FULLSCREEN
|
||||||
(when (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN props)
|
(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)
|
(cond ((= action xcb:ewmh:_NET_WM_STATE_ADD)
|
||||||
(unless exwm--fullscreen (exwm-layout-set-fullscreen id))
|
(unless exwm--fullscreen (exwm-layout-set-fullscreen id))
|
||||||
(push xcb:Atom:_NET_WM_STATE_FULLSCREEN props-new))
|
(push xcb:Atom:_NET_WM_STATE_FULLSCREEN props-new))
|
||||||
|
|
Loading…
Reference in a new issue