diff options
| author | Martin Rudalics | 2025-10-12 10:16:52 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2025-10-12 10:16:52 +0200 |
| commit | 90ba21979f26cede8ce50187ccbae45d712468f2 (patch) | |
| tree | 3e92c19ea61f65c43b128654757ead6b33276993 | |
| parent | f91de96d036d519c98c7d09e3a8516c916a5ec56 (diff) | |
| download | emacs-90ba21979f26cede8ce50187ccbae45d712468f2.tar.gz emacs-90ba21979f26cede8ce50187ccbae45d712468f2.zip | |
Make buffer-local decorations show up on new window-system frames (Bug#79606)
* lisp/frame.el (make-frame): On window-system frames apply
buffer-local values for fringes, scroll bars and margins of root
and minibuffer window after the new frame was made (Bug#79606).
| -rw-r--r-- | lisp/frame.el | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index f07a59c78d2..b6641ca716a 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -1116,6 +1116,34 @@ current buffer even if it is hidden." | |||
| 1116 | 1116 | ||
| 1117 | (normal-erase-is-backspace-setup-frame frame) | 1117 | (normal-erase-is-backspace-setup-frame frame) |
| 1118 | 1118 | ||
| 1119 | (when (window-system frame) | ||
| 1120 | ;; On a window-system frame apply buffer-local values for the | ||
| 1121 | ;; fringes, scroll bars and margins of root and minibuffer window | ||
| 1122 | ;; of the new frame. The 'frame-creation-function' above could | ||
| 1123 | ;; not do that since the frame did not exist yet at the time the | ||
| 1124 | ;; buffers for these windows were set (Bug#79606). | ||
| 1125 | (let* ((root (frame-root-window frame)) | ||
| 1126 | (buffer (window-buffer root))) | ||
| 1127 | (with-current-buffer buffer | ||
| 1128 | (set-window-fringes | ||
| 1129 | root left-fringe-width right-fringe-width fringes-outside-margins) | ||
| 1130 | (set-window-scroll-bars | ||
| 1131 | root scroll-bar-width vertical-scroll-bar | ||
| 1132 | scroll-bar-height horizontal-scroll-bar) | ||
| 1133 | (set-window-margins | ||
| 1134 | root left-margin-width right-margin-width))) | ||
| 1135 | (let* ((mini (minibuffer-window frame)) | ||
| 1136 | (buffer (window-buffer mini))) | ||
| 1137 | (when (eq (window-frame mini) frame) | ||
| 1138 | (with-current-buffer buffer | ||
| 1139 | (set-window-fringes | ||
| 1140 | mini left-fringe-width right-fringe-width fringes-outside-margins) | ||
| 1141 | (set-window-scroll-bars | ||
| 1142 | mini scroll-bar-width vertical-scroll-bar | ||
| 1143 | scroll-bar-height horizontal-scroll-bar) | ||
| 1144 | (set-window-margins | ||
| 1145 | mini left-margin-width right-margin-width))))) | ||
| 1146 | |||
| 1119 | ;; We can run `window-configuration-change-hook' for this frame now. | 1147 | ;; We can run `window-configuration-change-hook' for this frame now. |
| 1120 | (frame-after-make-frame frame t) | 1148 | (frame-after-make-frame frame t) |
| 1121 | (run-hook-with-args 'after-make-frame-functions frame) | 1149 | (run-hook-with-args 'after-make-frame-functions frame) |