Disable splitting of floating frames (#76)

Previously, floating frames were configured to never automatically
split, but they could be manually split (usually by accident).

* exwm-floating.el (exwm-floating--set-floating): disable splitting of
  floating windows by setting a the `split-window' window parameter to a
  function that always throws an error.
This commit is contained in:
Steven Allen 2024-08-23 19:08:02 +00:00 committed by GitHub
parent 423850fe83
commit f453664bd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -351,6 +351,8 @@ If TILED-P is non-nil, set actions for tiled window."
(set-window-buffer window (current-buffer)) ;this changes current buffer
(add-hook 'window-configuration-change-hook #'exwm-layout--refresh)
(set-window-dedicated-p window t)
(set-window-parameter window 'split-window
(lambda (&rest _) (user-error "Floating window cannot be split")))
(exwm-layout--show id window))
(with-current-buffer (exwm--id->buffer id)
(if (exwm-layout--iconic-state-p id)