-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED property #7681
Comments
The first concern would be, how does one unmaximize this window if there aren't any window controls (ignoring window list applet and shortcuts)? I'm pretty sure that's why we no longer support it, though I could be wrong. It looks like mutter (gnome's wm) has a preference to ignore these requests or not. I suppose we could do the same, but we'd probably default it to ignore. |
I think this is client responsibility, at least that is the way Gnome is going (by interpreting the titlebar is "owned by the client"), I'm not saying Cinnamon should follow Gnome there but:
I would say that Cinnamon should honour it and let the client provide its own means of exiting the maximized state. This is not a problem for a client such as emacs, emacs users that know how to toggle a property from emacs customization UI will probably also know how to exit maximized state with their keyboards (or by toggling the property again); anyway, that's for emacs to decide. Other clients will go the pure CSD way or won't provide a hide-titlebar-on-maximize option at all. Again: I'm not asking for the WM to hide decorations on maximize on a general basis but on a per client basis, letting the client decide. Additionally, honouring the property will simplify extensions like [2] that are currently a messy hack (I'm not even sure why this extension is setting _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED at all, maybe because it was ripped off from its Gnome equivalent --that's quite a hack too-- but the workhorse of the extension is _MOTIF_WM_HINTS). |
Another way to think about this is: nemo, terminal, firefox, all provide options to hide the menubar. The user that is willing to do that should also know how to undo it when needed. You're already allowing this feature for some clients, some of them show a popup explaining how to get the menu back, others don't, everything on a per client basis. Well, this is the same but for the titlebar. Moreover, don't expect many clients to do that. Some clients with long lived sessions that highly value screen space will want to optionally enter some kind of "no distractions mode". Users of these few applications that enabled this "no distraction mode" know what they're doing. |
Another thing to consider: even if you want to play safe and remove control even from power users that explicitly enabled it from their own apps, you can't really avoid that relatively popular extensions hide decorations in the worst possible way: relying on many hacks and on a global basis. |
Removing it was never about trying to hamper users (power- or otherwise) - for a period of time, Unity was heavily pushing the whole global menu idea, and the devs were patching popular programs to remove the titlebar. It was removed in defense of that primarily. With unity gone, and client-side-decorated windows being the new 'in thing' I couldn't come up with an argument not to restore this support, just no one had requested it up until now. |
Great, thanks a lot!
|
Sorry, would it be too much to ask for an option (just a gsettings option, no friendly UI) to set the _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED on every created window, in order to get this behavior globally? Many DEs allows something like that that: xfce, plasma, mate that I know of. Well, that's a possible implementation, maybe it's more easy to implement without using _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED. |
Regarding the last comment, just for anyone that happens to end up here in the future I've created maximal, a simple python xlib utility that just sits there waiting for creation events and setting |
The _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED property is supported by Gnome and it's currently the only way AFAICS that allows a client ask the WM to remove its decorations. We are trying to implement a hide-titlebar-on-maximize mode for Emacs but when the client explicitly hides/shows its decorations bad things happen both under Gnome and under Cinnamon. For instance, if you maximize the window, then hide its decorations, then show them again, the window becomes invisible, probably because Cinnamon WM is trying to fit a full-sized undecorated window plus its restored decorations so yielding a geometry larger than the actual screen. The bottom line is that it's safer to politely request the WM to remove the decorations, but there is no way to do that in Cinnamon. Notice I'm not asking for a settings UI but just for honouring the _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED property.
The text was updated successfully, but these errors were encountered: