Skip to content
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

Do not hide maximized windows title in 19.04 #31

Open
Morda007 opened this issue Apr 5, 2019 · 6 comments
Open

Do not hide maximized windows title in 19.04 #31

Morda007 opened this issue Apr 5, 2019 · 6 comments

Comments

@Morda007
Copy link

Morda007 commented Apr 5, 2019

Hi!
(sorry my ugly English)
New installation of Budgie 19.04.
Two pixel saver applet on top panel (for window title and buttons).
Do not hide maximized window own title.

@brdloush
Copy link

+1 Just upgraded to from ubuntu budgie 1810 to 19.04 and while pixel saver's window title and controls are being shown in top panel, the window's "top bar" with title and window controls is still present.

@fossfreedom
Copy link
Contributor

fossfreedom commented Apr 22, 2019

FYI - the issue is due to mutter 3.32 changes where GNOME mutter devs have dropped the hide-on-maximise window hint.

Pixel saver will need now to use the motif window hint according to this discussion

https://gitlab.gnome.org/GNOME/mutter/merge_requests/221

So if anyone is up to forking and fixing that would be great.

EDIT (26/04): example of how to use the motif window hint ... via a shell script https://github.com/murat-cileli/gnome-shell-no-title-bar-when-maximized/blob/master/no-title-bar.sh

@ghost
Copy link

ghost commented Apr 27, 2019

You can use this

#!/bin/bash
while true
do
    sleep 0.5s;
    width="$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' | cut -f1 -d"x")";
    id="$(xdotool getwindowfocus)";
    geometry="$(xdotool getwindowfocus getwindowgeometry | grep -i geometry)";
    state="xprop -id $id | grep _MOTIF_WM_HINTS | cut -f2 -d"=")";
    if [[ $geometry == *"$width"* ]]; then
      if [[ $state != " 2, 0, 0, 0, 0" ]]; then
          xprop -id $id -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
      fi
    else
      if [[ $state != " 2, 0, 1, 0, 0" ]]; then
          xprop -id $id -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x1, 0x0, 0x0"
      fi
    fi
done

@fossfreedom
Copy link
Contributor

fossfreedom commented Apr 29, 2019

Attached is a test diff that should bring back pixel saver functionality under mutter 3.32

(created using debdiff from Ubuntu Budgie's pixel-saver debian package)

Note - no attempt has been to make this backward compatible (I haven't test it!) with previous mutter versions. Also removing the applet doesnt readd titlebars for maximised windows.

Let me know your thoughts

EDIT:02 May 19
mutter332.patch.txt

@fossfreedom
Copy link
Contributor

Given the lack of activity I have soft-forked this repo and applied this: https://github.com/UbuntuBudgie/budgie-pixel-saver-applet

I have also packaged and release the fix for Ubuntu Budgie users via our backports PPA.

@CheeseEMan
Copy link

CheeseEMan commented Jun 19, 2019

This will create a dummy titlebar on Firefox if you turn off titlebars in Firefox, how could I fix this?
Pixel-Saver-Issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants