mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-30 14:38:00 +01:00
Do not wait for WM_STATE property events
* exwm-layout.el (exwm-layout--show, exwm-layout--hide): Save the state directly.
This commit is contained in:
parent
bc4aafec16
commit
74fba563b8
1 changed files with 22 additions and 21 deletions
|
@ -103,7 +103,8 @@
|
||||||
(xcb:+request exwm--connection
|
(xcb:+request exwm--connection
|
||||||
(make-instance 'xcb:icccm:set-WM_STATE
|
(make-instance 'xcb:icccm:set-WM_STATE
|
||||||
:window id :state xcb:icccm:WM_STATE:NormalState
|
:window id :state xcb:icccm:WM_STATE:NormalState
|
||||||
:icon xcb:Window:None)))
|
:icon xcb:Window:None))
|
||||||
|
(setq exwm-state xcb:icccm:WM_STATE:NormalState))
|
||||||
(xcb:+request exwm--connection
|
(xcb:+request exwm--connection
|
||||||
(make-instance 'xcb:SendEvent
|
(make-instance 'xcb:SendEvent
|
||||||
:propagate 0 :destination id
|
:propagate 0 :destination id
|
||||||
|
@ -122,27 +123,27 @@
|
||||||
|
|
||||||
(defun exwm-layout--hide (id)
|
(defun exwm-layout--hide (id)
|
||||||
"Hide window ID."
|
"Hide window ID."
|
||||||
(unless (eq xcb:icccm:WM_STATE:IconicState ;already hidden
|
(with-current-buffer (exwm--id->buffer id)
|
||||||
(with-current-buffer (exwm--id->buffer id) exwm-state))
|
(unless (eq xcb:icccm:WM_STATE:IconicState exwm-state) ;already hidden
|
||||||
(exwm--log "Hide #x%x" id)
|
(exwm--log "Hide #x%x" id)
|
||||||
(xcb:+request exwm--connection
|
|
||||||
(make-instance 'xcb:ChangeWindowAttributes
|
|
||||||
:window id :value-mask xcb:CW:EventMask
|
|
||||||
:event-mask xcb:EventMask:NoEvent))
|
|
||||||
(xcb:+request exwm--connection (make-instance 'xcb:UnmapWindow :window id))
|
|
||||||
(xcb:+request exwm--connection
|
|
||||||
(make-instance 'xcb:ChangeWindowAttributes
|
|
||||||
:window id :value-mask xcb:CW:EventMask
|
|
||||||
:event-mask exwm--client-event-mask))
|
|
||||||
(with-current-buffer (exwm--id->buffer id)
|
|
||||||
(xcb:+request exwm--connection
|
(xcb:+request exwm--connection
|
||||||
(make-instance 'xcb:UnmapWindow :window exwm--container)))
|
(make-instance 'xcb:ChangeWindowAttributes
|
||||||
(xcb:+request exwm--connection
|
:window id :value-mask xcb:CW:EventMask
|
||||||
(make-instance 'xcb:icccm:set-WM_STATE
|
:event-mask xcb:EventMask:NoEvent))
|
||||||
:window id
|
(xcb:+request exwm--connection (make-instance 'xcb:UnmapWindow :window id))
|
||||||
:state xcb:icccm:WM_STATE:IconicState
|
(xcb:+request exwm--connection
|
||||||
:icon xcb:Window:None))
|
(make-instance 'xcb:ChangeWindowAttributes
|
||||||
(xcb:flush exwm--connection)))
|
:window id :value-mask xcb:CW:EventMask
|
||||||
|
:event-mask exwm--client-event-mask))
|
||||||
|
(xcb:+request exwm--connection
|
||||||
|
(make-instance 'xcb:UnmapWindow :window exwm--container))
|
||||||
|
(xcb:+request exwm--connection
|
||||||
|
(make-instance 'xcb:icccm:set-WM_STATE
|
||||||
|
:window id
|
||||||
|
:state xcb:icccm:WM_STATE:IconicState
|
||||||
|
:icon xcb:Window:None))
|
||||||
|
(setq exwm-state xcb:icccm:WM_STATE:IconicState)
|
||||||
|
(xcb:flush exwm--connection))))
|
||||||
|
|
||||||
(defvar exwm-workspace--current)
|
(defvar exwm-workspace--current)
|
||||||
(defvar exwm-workspace--list)
|
(defvar exwm-workspace--list)
|
||||||
|
|
Loading…
Reference in a new issue