masm11 / emacs

Mirror of GNU Emacs
http://www.gnu.org/software/emacs/
GNU General Public License v3.0
198 stars 14 forks source link

Remove headerbar in Wayland session? #86

Closed worldofgeese closed 3 years ago

worldofgeese commented 3 years ago

In Wayland sessions, Emacs gains a very large headerbar at the top. Is there a method to tell Emacs pgtk on Wayland to disable the headerbar?

image

Thaodan commented 3 years ago

Do you mean the window decoration? That is the job of the window-manager.

fejfighter commented 3 years ago

@worldofgeese

If you run emacs full screen with <f11> the headerbar will disappear

I'm not sure if there is a method to keep the gnome bar above active, in full screen mode

A6GibKm commented 3 years ago

Yes it can be done in gtk (kinda), with a little work and has nothing to do with wayland.

If the window can be changed from GtkApplicationWindow to HdyApplicationWindow (using libhandy), the headerbar becomes not necessary and can be hidden at will (The headerbar should use HdyHeaderbar for this).

It might be possible also with css without the need for libhandy. Or simple calling headerbar.hide(), but I am not sure about that one.

worldofgeese commented 3 years ago

Do you mean the window decoration? That is the job of the window-manager.

That's right: some apps can have this headerbar disabled (such as Gnome Terminal) through a gsettings invocation. I'd like to know if there is any command like this available for this Emacs build as it's quite a visual nuisance.

Thaodan commented 3 years ago

Or fix your window manager instead of breaking other non-gnome users?

worldofgeese commented 3 years ago

Or fix your window manager instead of breaking other non-gnome users?

I invite you to speak kindly here: no need for micro-aggressions. No one is asking to break the experience for non-gnome users. There are many apps, such as Firefox, that appear to solve this out of the box (Firefox doesn't display a headerbar by default, for example). That's what this issue is about, can we signal to a Wayland Gnome session not to display the headerbar by default?

masm11 commented 3 years ago

@worldofgeese Do you want this?

(modify-frame-parameters nil '((undecorated . nil)))
worldofgeese commented 3 years ago
```emacs-lisp
(modify-frame-parameters nil '((undecorated . nil)))

Unfortunately, that doesn't signal to Gnome's Wayland session to not paint the headerbar.

Emantor commented 3 years ago
```emacs-lisp
(modify-frame-parameters nil '((undecorated . nil)))

Unfortunately, that doesn't signal to Gnome's Wayland session to not paint the headerbar.

As far as I know, gnomes wayland session enforces client side decorations, which are handled through gtk. I however don't know how to disable them for gtk-apps.

masm11 commented 3 years ago

@worldofgeese I'm sorry. The value should not be nil, but t. Could you try this?

(modify-frame-parameters nil '((undecorated . t)))
worldofgeese commented 3 years ago

@masm11 That worked! Thank you 🙇