Zren / material-decoration

Material-ish window decoration theme for KWin, with LIM, based on zzag's original design.
GNU General Public License v2.0
197 stars 17 forks source link

does not work on lxqt with kwin #69

Open Vosjedev opened 1 year ago

Vosjedev commented 1 year ago

i just switched from kde to lxqt, and i cant see the LIM. i already tried reinstalling, restarting kwin, running QT_LOGGING_RULES="*=false;kdecoration.material=true" kstart5 -- kwin_x11 --replace, setting the window decoration to breeze and back to material. i can send logs or output of a command or anything else needed to resolve the problem.

Zren commented 1 year ago

That's because the AppMenuModel looks for the KDE X11 window properties (aka atoms).

https://github.com/Zren/material-decoration/blob/master/src/AppMenuModel.cc#L65

You can confirm if a window has those properties with xprop then clicking a window.

I' know that KDE's gmenu-dbusmenu-proxy is used to proxy GTK menues to this KDE DBus API. I also know there's probably a Unity based DBus API but I don't remember how it works.

https://invent.kde.org/plasma/plasma-workspace/-/tree/master/gmenu-dbusmenu-proxy

GTK App (Firefox with OpenSUSE patches) in KDE. Doesn't seem to have _KDE_NET_WM_APPMENU_OBJECT_PATH for some reason.

_GTK_MENUBAR_OBJECT_PATH(UTF8_STRING) = "/org/appmenu/gtk/window/4"
_UNITY_OBJECT_PATH(UTF8_STRING) = "/org/appmenu/gtk/window/4"
_GTK_UNIQUE_BUS_NAME(UTF8_STRING) = ":1.569"

Qt App (Dolphin) in KDE

_KDE_NET_WM_APPMENU_OBJECT_PATH(STRING) = "/MenuBar/1"
_KDE_NET_WM_APPMENU_SERVICE_NAME(STRING) = ":1.1881"

Another useful tool is qdbusviewer.

❯ locate qdbusviewer
/usr/bin/qdbusviewer-qt5
/usr/lib64/qt5/bin/qdbusviewer
Vosjedev commented 1 year ago

ah. so this is kde specific, not kwin. oke!