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

From: Carlos Pita <[email-masked]>
Date: Mon, 2 Jul 2018 11:22:45 -0300

I would oppose to any change that exlicitly undecorates and redecorates the
window because (I'm summing up below what I already mentioned in a more
haphazardly way above):

1. Both under Gnome and under Cinnamon there are scenarios in which
changing the client decorated state wreaks havoc with WM operation. In
Gnome when you remove decorations the client lose focus. In Cinnamon
undecorating and redecorating a maximized window makes it completely
inaccessible, as if the WM couldn't show it anymore. I managed to make the
maximize-undecorate / unmaximize-decorate combo work under Cinnamon, but
that's all. Expect problems under other DEs and WMs.

2. Using Jonathan hook shares the problems described in point 1, since it
explicitly deals with decorations instead of just hinting the WM, but also
fails to redecorate the window in many circumstances, since the hook seems
to be called before the maximized property was removed from the frame
properties alist. Even if there were a more convenient event to hook from
(I was unable to find one in frame.el) I would disregard the solution
because of 1.

So that let's us able to support WMs that offers
_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED or a similar mechanism, or that
explicitly advertise they allow decoration change events triggered by the
client.

I've requested support for _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED in the
Cinnamon tracker [1], maybe you can argue a bit more for the feature there.

---

[1] https://github.com/linuxmint/Cinnamon/issues/7681