diff options
author | Philip <pipcet@gmail.com> | 2015-08-24T19·09+0000 |
---|---|---|
committer | Philip <pipcet@gmail.com> | 2015-08-24T19·12+0000 |
commit | 94bdbfc0da7c8ef14acdc8aa4e73dc1c8fee9700 (patch) | |
tree | ddfe7add7d2dee590f8d366eefbef930067c3ebd /exwm-workspace.el | |
parent | 5882015eb5a21cb859794388e21d6dc023764480 (diff) |
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
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r-- | exwm-workspace.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el index 7ac1fecb755f..8e3839f024a4 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -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 |