unite-shell icon indicating copy to clipboard operation
unite-shell copied to clipboard

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

Open hyperair opened this issue 2 years ago • 3 comments
trafficstars

  • 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

hyperair avatar Jun 14 '23 09:06 hyperair

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

hyperair avatar Jun 14 '23 09:06 hyperair

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 avatar Jul 21 '23 10:07 jonian

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

jonian avatar Jul 21 '23 10:07 jonian