Avoid using the "no window manager" code in Emacs
* exwm.el (exwm--on-ClientMessage): Handle fullscreen requests
for frames.
(exwm-init): Initialize workspaces after unlocking events.
* exwm-workspace.el (exwm-workspace--init): Create frames as
invisible, then make them visible only once their OverrideRedirect
property has been set.
* exwm-randr.el (exwm-randr--refresh): New frame parameter
`exwm-geometry'.
* exwm-layout.el (exwm-layout--set-frame-fullscreen): New
function.
The Emacs code is buggy, see https://github.com/ch11ng/exwm/issues/39
https://github.com/ch11ng/exwm/pull/42
This commit is contained in:
parent
5882015eb5
commit
94bdbfc0da
4 changed files with 60 additions and 6 deletions
|
|
@ -231,13 +231,11 @@ The optional FORCE option is for internal use only."
|
|||
(unless (frame-parameter i 'window-id)
|
||||
(setq exwm-workspace--list (delq i exwm-workspace--list)))))
|
||||
(cl-assert (= 1 (length exwm-workspace--list)))
|
||||
(exwm--make-emacs-idle-for 0.1) ;wait for the frame ready
|
||||
;; Configure the existing frame
|
||||
(set-frame-parameter (car exwm-workspace--list) 'fullscreen 'fullboth)
|
||||
;; Create remaining frames
|
||||
(dotimes (i (1- exwm-workspace-number))
|
||||
(nconc exwm-workspace--list
|
||||
(list (make-frame '((window-system . x) (fullscreen . fullboth))))))
|
||||
(list (make-frame '((window-system . x)
|
||||
(visibility . nil))))))
|
||||
;; Configure workspaces
|
||||
(dolist (i exwm-workspace--list)
|
||||
(let ((window-id (string-to-int (frame-parameter i 'window-id)))
|
||||
|
|
@ -256,6 +254,14 @@ The optional FORCE option is for internal use only."
|
|||
:window window-id :value-mask xcb:CW:EventMask
|
||||
:event-mask xcb:EventMask:SubstructureRedirect))))
|
||||
(xcb:flush exwm--connection)
|
||||
;; We have to delay making the frame visible until the
|
||||
;; override-redirect flag has been set.
|
||||
(select-frame-set-input-focus (car exwm-workspace--list))
|
||||
(dolist (i exwm-workspace--list)
|
||||
(set-frame-parameter i 'visibility t)
|
||||
(lower-frame i)
|
||||
(set-frame-parameter i 'fullscreen 'fullboth))
|
||||
(raise-frame (car exwm-workspace--list))
|
||||
;; Handle unexpected frame switch
|
||||
(add-hook 'focus-in-hook 'exwm-workspace--on-focus-in)
|
||||
;; Switch to the first workspace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue