bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Robert Pluim
Subject: bug#31968: 26.1.50; Allow to hide title bar on maximize (gtk/gnome/csd)
Date: Thu, 28 Jun 2018 14:23:41 +0200

martin rudalics <rudalics@gmx.at> writes:

>>> 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)
>
> Wouldn't that show the title bar when making the frame fullscreen via
> F11?

It doesnʼt for me. Note you can use 'move-frame-functions' instead of
window-size-change-functions if you prefer.

Robert





reply via email to

[Prev in Thread] Current Thread [Next in Thread]