The tasks model now exposes a window's application menu object path and service name.
No update signals set up for XOrg; not sure what to listen for.
broulik |
Plasma |
The tasks model now exposes a window's application menu object path and service name.
No update signals set up for XOrg; not sure what to listen for.
See that the model has more roles and see that they're wired to the application
menu obiect path and service name on Wayland and XOrg.
No Linters Available |
No Unit Test Coverage |
Buildable 23874 | |
Build 23892: arc lint + arc unit |
Can we make the dbus service role name more generic? GTK has a generic DBus prop on the window, too.
For X check out the appmenu applet: https://cgit.kde.org/plasma-workspace.git/tree/applets/appmenu/plugin/appmenumodel.cpp#n164
I was wondering if we should maybe add that to NETWM or KWindowInfo instead of doing lowlevel X calls in libTM, which I don't think it does at this point
I suppose you missed the FIXME comment where I literally say to check that file out?
But yeah, the low level X calls are pretty ugly and the reason why I left it a FIXME.
Both the org.gtk.Actions and the org.gtk.Menus dbus interfaces exposed by GIO's GApplication class are primarily used for application menus.
I think you should cache the X props, otherwise every data access causes a round trip to the X server.
libtaskmanager/xwindowtasksmodel.cpp | ||
---|---|---|
472 | We generally want to avoid global statics in library code. In the applet it's fine because it's a plugin that is loaded on demand | |
475 | Is this check needed? I would think xwindowtasksmodel is guarded in its entirety both compile-time and run-time. | |
486 | Avoid double look-up, use iterator | |
494 | Avoid double hash look-up. Store atom in variable and check it | |
523 | Use null QString() |
Implemented a cache for appmenus, but as I don't know what to listen to for appmenu updates, I haven't implemented cache invalidation.
I think if you added those properties KWindowInfo, you'd get change events, cache eviction, less manual X code basically for free :)
libtaskmanager/CMakeLists.txt | ||
---|---|---|
60 | Unused |