GNU bug report logs - #31968
26.1.50; Allow to hide title bar on maximize (gtk/gnome/csd)

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Mon, 25 Jun 2018 20:45:02 UTC

Severity: wishlist

Found in version 26.1.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 31968 <at> debbugs.gnu.org (full text, mbox):

From: Jonathan Kyle Mitchell <kyle <at> jonathanmitchell.org>
To: carlosjosepita <at> gmail.com
Cc: 31968 <at> debbugs.gnu.org, rpluim <at> gmail.com
Subject: Re: bug#31968: 26.1.50;
 Allow to hide title bar on maximize (gtk/gnome/csd)
Date: Wed, 27 Jun 2018 23:22:23 -0500
On Wed, Jun 27, 2018 at 10:21 AM Carlos Pita <carlosjosepita <at> gmail.com> wrote:
>
> Yes, but the point is to hook something like that on
> maximized/unmaximized events, which I don't see how to do.

Since maximizing a frame changes the window size, couldn't you hook
into window-size-change-functions to achieve the desired effect?
Something like this perhaps:

(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)

--
Jonathan Kyle Mitchell




This bug report was last modified 3 years and 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.