Gtk app menu is tiled
Closed this issue · 3 comments
As shown in NixOS/nixpkgs#145274 the app menu for (only) gtk app menu is tiled when it should not
I believe this is because Wayland does not have a concept of window types. Back in X11 we had window types according to the opendesktop standard. So back in the X11 version of this script I also used these window types to not tile certain windows if they were not a normal application. As according to the spec at https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html
_NET_WM_WINDOW_TYPE_DESKTOP, ATOM
_NET_WM_WINDOW_TYPE_DOCK, ATOM
_NET_WM_WINDOW_TYPE_TOOLBAR, ATOM
_NET_WM_WINDOW_TYPE_MENU, ATOM
_NET_WM_WINDOW_TYPE_UTILITY, ATOM
_NET_WM_WINDOW_TYPE_SPLASH, ATOM
_NET_WM_WINDOW_TYPE_DIALOG, ATOM
_NET_WM_WINDOW_TYPE_DROPDOWN_MENU, ATOM
_NET_WM_WINDOW_TYPE_POPUP_MENU, ATOM
_NET_WM_WINDOW_TYPE_TOOLTIP, ATOM
_NET_WM_WINDOW_TYPE_NOTIFICATION, ATOM
_NET_WM_WINDOW_TYPE_COMBO, ATOM
_NET_WM_WINDOW_TYPE_DND, ATOM
_NET_WM_WINDOW_TYPE_NORMAL, ATOM
I have asked the KWin developer what the best way to deal with this problem in wayland was #78 and implemented that by checking for transientFor. But the application developer has to properly set this so KWin knows it's not a regular application.
An easy fix to deal with it for now is to ignore the specific menu windows by adding it to the ignore regex.
But I think this is a problem with that specific application that it doesn't correctly register as transient for KWin wayland. For example Inkscape is also a GTK application as far as I'm aware but the import dialog of Inkscape correctly sets itselfs as transient and thus it doesn't get tiled. Or another example, GIMP has an Open dialog and that doesn't get tiled either by default since it correctly registers as a transient window.
I finally had some spare time again and did some digging in KWin and I found some changes since last time I checked it. It seems that they support windows types in wayland as well now. So I added the support for it in the dev branch. Give it a try, by default it will now only tile windows of type normalWindow
but I made it user configurable.
Fixed by adding property ignores