From 866a2d5ae12706a68acb83f489dd669bc7b29d1e Mon Sep 17 00:00:00 2001 From: bb2020 Date: Sat, 10 Dec 2022 08:46:38 +0300 Subject: [PATCH] [core] disable internal border (#15843) * core/core-spacemacs.el: disable internal border with undecorated frame * core/core-spacemacs.el: enable maximized-at-startup by default --- core/core-dotspacemacs.el | 2 +- core/core-spacemacs.el | 4 +++- core/templates/.spacemacs.template | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/core-dotspacemacs.el b/core/core-dotspacemacs.el index 625ce26d9..c17e04da4 100644 --- a/core/core-dotspacemacs.el +++ b/core/core-dotspacemacs.el @@ -472,7 +472,7 @@ to disable fullscreen animations on macOS." 'boolean 'spacemacs-dotspacemacs-init) -(spacemacs|defc dotspacemacs-maximized-at-startup nil +(spacemacs|defc dotspacemacs-maximized-at-startup t "If non nil the frame is maximized when Emacs starts up (Emacs 24.4+ only). Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil." 'boolean diff --git a/core/core-spacemacs.el b/core/core-spacemacs.el index 468a9e0b5..94316979c 100644 --- a/core/core-spacemacs.el +++ b/core/core-spacemacs.el @@ -94,7 +94,9 @@ the final step of executing code in `emacs-startup-hook'.") (when dotspacemacs-undecorated-at-startup ;; this should be called before toggle-frame-maximized (set-frame-parameter nil 'undecorated t) - (add-to-list 'default-frame-alist '(undecorated . t))) + (set-frame-parameter nil 'internal-border-width 0) + (add-to-list 'default-frame-alist '(undecorated . t)) + (add-to-list 'default-frame-alist '(internal-border-width . 0))) (when dotspacemacs-maximized-at-startup (unless (frame-parameter nil 'fullscreen) (toggle-frame-maximized)) diff --git a/core/templates/.spacemacs.template b/core/templates/.spacemacs.template index 710511279..c4448660b 100644 --- a/core/templates/.spacemacs.template +++ b/core/templates/.spacemacs.template @@ -359,12 +359,12 @@ It should only modify the values of Spacemacs settings." ;; If non-nil the frame is maximized when Emacs starts up. ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil. - ;; (default nil) (Emacs 24.4+ only) - dotspacemacs-maximized-at-startup nil + ;; (default t) (Emacs 24.4+ only) + dotspacemacs-maximized-at-startup t ;; If non-nil the frame is undecorated when Emacs starts up. Combine this - ;; variable with `dotspacemacs-maximized-at-startup' in OSX to obtain - ;; borderless fullscreen. (default nil) + ;; variable with `dotspacemacs-maximized-at-startup' to obtain fullscreen + ;; without external boxes. Also disables the internal border. (default nil) dotspacemacs-undecorated-at-startup nil ;; A value from the range (0..100), in increasing opacity, which describes