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

Fix decoration issues on x11 on gnome-shell/mutter 44 #334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hyperair
Copy link

@hyperair hyperair commented Jun 14, 2023

  • Change _HIDE_FLAGS to use 0x0 in decorations fields of _MOTIF_WM_HINTS
  • Change ServerDecorations.handle to use a boolean flag tracking whether the window decorations were previously hidden by united, because mutter now keeps window->decorated in sync with window->mwm_decorated
  • Change ServerDecorations.decorated to use this.win.decorated since that flag is now kept up-to-date. Additionally, win.get_frame_type() now seems to never become Meta.FrameType.BORDER

Fixes #324

- Change _HIDE_FLAGS to use 0x0 in decorations fields of _MOTIF_WM_HINTS
- Change ServerDecorations.handle to use a boolean flag tracking whether the
  window decorations were previously hidden by united, because mutter now keeps
  `window->decorated` in sync with `window->mwm_decorated`
- Change ServerDecorations.decorated to use `this.win.decorated` since that flag
  is now kept up-to-date. Additionally, win.get_frame_type() now seems to never
  become Meta.FrameType.BORDER

Fixes: hardpixel#324
@hyperair
Copy link
Author

hyperair commented Jun 14, 2023

Tested to work on Ubuntu 23.04 with gnome-shell and mutter 44.1-0ubuntu1 with the following windows:

  • urxvt -- titlebar is hidden when maximized and shown when unmaximized
  • spotify -- titlebar is hidden when maximized and shown correctly unmaximized
  • chrome beta -- titlebar is hidden because it handles its own decoration, and unite-shell doesn't touch it
  • nautilus -- same as chrome beta

@jonian
Copy link
Member

jonian commented Jul 21, 2023

Hi @hyperair, thanks for the PR and sorry for the late response. There is an issue with this solution, the this.hidden_by_us variable will not persist on screen lock/unlock or on a shell restart.

One solution is to save it on window hint, but that has it's own problems. You have to use GLib.spawn_command_line_sync to get the saved value, which can cause performance issues.

For now, it is best to report the issue upstream (GNOME mutter).

@jonian
Copy link
Member

jonian commented Jul 21, 2023

I reported the issue here, only for tiled windows since I can't replicate it for maximized windows.

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

Successfully merging this pull request may close these issues.

"Hide Window Titlebar" doesn't seem to have any effect on GNOME 44
2 participants