[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 459d5ff8ad: * lisp/desktop.el: Enable tab-bar-mode after restorin
From: |
Juri Linkov |
Subject: |
master 459d5ff8ad: * lisp/desktop.el: Enable tab-bar-mode after restoring frames with a tab bar. |
Date: |
Thu, 5 May 2022 14:08:53 -0400 (EDT) |
branch: master
commit 459d5ff8ad72dab8831635e3d914389982041ad2
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
* lisp/desktop.el: Enable tab-bar-mode after restoring frames with a tab
bar.
(desktop-restore-frameset): Enable tab-bar-mode when a restored frame
contains the frame parameter tab-bar-lines (bug#55070).
---
lisp/desktop.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/desktop.el b/lisp/desktop.el
index e438b98c0e..1a4103e209 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1269,7 +1269,16 @@ being set (usually, by reading it from the desktop)."
:cleanup-frames (not (eq desktop-restore-reuses-frames
'keep))
:force-display desktop-restore-in-current-display
:force-onscreen (and desktop-restore-forces-onscreen
- (display-graphic-p)))))
+ (display-graphic-p)))
+ ;; When at least one restored frame contains a tab bar,
+ ;; enable `tab-bar-mode' that takes care about recalculating
+ ;; the correct values of the frame parameter `tab-bar-lines'
+ ;; (that depends on `tab-bar-show'), and also loads graphical buttons.
+ (when (seq-some
+ (lambda (frame)
+ (menu-bar-positive-p (frame-parameter frame 'tab-bar-lines)))
+ (frame-list))
+ (tab-bar-mode 1))))
;; Just to silence the byte compiler.
;; Dynamically bound in `desktop-read'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 459d5ff8ad: * lisp/desktop.el: Enable tab-bar-mode after restoring frames with a tab bar.,
Juri Linkov <=