Subject: Re: bug#31968: 26.1.50; Allow to hide title bar on maximize (gtk/gnome/csd)

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 29 Apr 2022 12:31:22 +0200

Po Lu <[email-masked]> writes:

> BTW, the frame resize synchronization introduced recently might
> alleviate the flicker in the Lisp-based solutions, though I don't see
> any flicker with or without resize synchronization.

Let's see...  this was the proposed code:

(defun hide-titlebar-when-maximized (frame)
  (if (eq 'maximized (alist-get 'fullscreen (frame-parameters frame)))
      (set-frame-parameter frame 'undecorated t)
    (set-frame-parameter frame 'undecorated nil)))

(add-hook 'window-size-change-functions 'hide-titlebar-when-maximized)

And indeed -- I don't see any flickering, so this seems like a good
solution.

So I think I'll add `hide-titlebar-when-maximized' to Emacs 29, and then
document that as a possible value for `window-size-change-functions'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no