Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

persp-mode conflicts with EXWM #569

Open
shader opened this issue Apr 19, 2019 · 4 comments
Open

persp-mode conflicts with EXWM #569

shader opened this issue Apr 19, 2019 · 4 comments

Comments

@shader
Copy link

shader commented Apr 19, 2019

If I use EXWM and persp mode at the same time, I observe the following bugs:

  1. "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.
  2. 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

@ch11ng
Copy link
Owner

ch11ng commented Apr 21, 2019

No idea yet but EXWM creates a frame for every new floating X window and this may trigger persp-mode to manipulate window configurations.

@QiangF
Copy link

QiangF commented May 5, 2019

@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.

@ch11ng
Copy link
Owner

ch11ng commented May 12, 2019

it would be cool if winner mode can restore floating windows layout.

I totally agree with this, but not through workarounds.

@lwf
Copy link

lwf commented Sep 22, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants