exwm
exwm copied to clipboard
persp-mode conflicts with EXWM
If I use EXWM and persp mode at the same time, I observe the following bugs:
- "Second order" dialogs, such as the "Open with" dialog when downloading a file with Firefox, do not render. Instead, the background image is displayed as if there is a hole.
- If a parent window is split, any floating windows it displays will also be split and have an attached window showing another buffer. This can be reproduced at the same time as (1) with the Firefox file download dialog.
As yet, I have no idea what the actual root of the problem is.
I have also reported this on persp-mode as Bad-ptr/persp-mode.el#102
No idea yet but EXWM creates a frame for every new floating X window and this may trigger persp-mode to manipulate window configurations.
@shader Do you have issues when only use persp-mode in non exwm buffers? For me winner mode can 't detect exwm buffer modification, and I have this setting to let winner remember the layout if I stared at the window for more than 2 secs
(setq my-buffer-remember-delay-time "2 sec")
(defun my-reset-winner-last-command (BUFFER-OR-NAME)
(let ((buffer-switched-into (get-buffer BUFFER-OR-NAME)))
;; check if the target buffer is still current
(when (eq buffer-switched-into (current-buffer))
(with-current-buffer buffer-switched-into
;; reset winner-last-command, see winner-save-old-configurations
;; in winner repeat the same command doesn't insert new config
;; winner also save win configs before winner undo
(setq winner-last-command nil)))))
(defun my-winner-save-at-pause (WINDOW BUFFER-OR-NAME &optional KEEP-MARGINS)
(run-at-time my-buffer-remember-delay-time nil #'my-reset-winner-last-command BUFFER-OR-NAME))
(advice-add 'set-window-buffer :after #'my-winner-save-at-pause)
@ch11ng it would be cool if winner mode can restore floating windows layout.
it would be cool if winner mode can restore floating windows layout.
I totally agree with this, but not through workarounds.
For 2), you can use the following:
(add-to-list 'persp-restore-window-conf-filter-functions #'(lambda (f p new-f-p) (frame-parameter f 'unsplittable)))
This preempts persp-mode from splitting the floating frame.