Discussion:
Review Request 108957: Adding BAMF support to KWin
(too old to reply)
Martin Gräßlin
2013-02-14 12:01:53 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108957/
-----------------------------------------------------------

Review request for kwin.


Description
-------

Adding BAMF support to KWin

BAMF is a library used by Unity to match windows to their applications.
This is also pretty useful for KWin, possible uses are:
* better filtering on whether two Clients belong to the same application
* Using the application name as caption in case the window title is bad
* Getting better icons for window switcher/decorations, mostly important
for high resolution displays as icons provided through X property do
not include the large icons (e.g. 128x128)
* Using application name for application menu button

So far support is added to get the KDesktopFile for a Client and this is
exported to KWinEffects.

BAMF is probably also useful in other areas of the workspaces, e.g. for
libtaskmanager.


Diffs
-----

CMakeLists.txt 6084d7dd7655372506e02abe9f141b73155c5857
cmake/modules/CMakeLists.txt 8d3d58189dbcb9e89d4d9c9aa4f3c1c93abad5e4
cmake/modules/FindQtBAMF.cmake PRE-CREATION
config-workspace.h.cmake 4a2dcbf481bff35c3b05366a3d1a79bb1f400b88
kwin/CMakeLists.txt 2f44c57066913e05062bc1a3c3d8a03e924906dc
kwin/client.h 4cbc20f8e2b3aa31c1c33d63ae90f1f0c9eeefbf
kwin/client.cpp 2ce68fb4a0f108442b3476d39a90895bb1d12ffb
kwin/libkwineffects/kwineffects.h 464d7f2c3261c389dcf2349168b8d67cb691563a
kwin/libkwineffects/kwineffects.cpp 7d522d11e1cc71598e646c972c37f1af2275c3fc

Diff: http://git.reviewboard.kde.org/r/108957/diff/


Testing
-------


Thanks,

Martin GrÀßlin
Martin Gräßlin
2013-02-14 12:02:39 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108957/
-----------------------------------------------------------

(Updated Feb. 14, 2013, 1:02 p.m.)


Review request for kwin and Plasma.


Changes
-------

adding Plasma to review groups as it adds an optional build dep to workspaces and is also interesting for plasma


Description
-------

Adding BAMF support to KWin

BAMF is a library used by Unity to match windows to their applications.
This is also pretty useful for KWin, possible uses are:
* better filtering on whether two Clients belong to the same application
* Using the application name as caption in case the window title is bad
* Getting better icons for window switcher/decorations, mostly important
for high resolution displays as icons provided through X property do
not include the large icons (e.g. 128x128)
* Using application name for application menu button

So far support is added to get the KDesktopFile for a Client and this is
exported to KWinEffects.

BAMF is probably also useful in other areas of the workspaces, e.g. for
libtaskmanager.


Diffs
-----

CMakeLists.txt 6084d7dd7655372506e02abe9f141b73155c5857
cmake/modules/CMakeLists.txt 8d3d58189dbcb9e89d4d9c9aa4f3c1c93abad5e4
cmake/modules/FindQtBAMF.cmake PRE-CREATION
config-workspace.h.cmake 4a2dcbf481bff35c3b05366a3d1a79bb1f400b88
kwin/CMakeLists.txt 2f44c57066913e05062bc1a3c3d8a03e924906dc
kwin/client.h 4cbc20f8e2b3aa31c1c33d63ae90f1f0c9eeefbf
kwin/client.cpp 2ce68fb4a0f108442b3476d39a90895bb1d12ffb
kwin/libkwineffects/kwineffects.h 464d7f2c3261c389dcf2349168b8d67cb691563a
kwin/libkwineffects/kwineffects.cpp 7d522d11e1cc71598e646c972c37f1af2275c3fc

Diff: http://git.reviewboard.kde.org/r/108957/diff/


Testing
-------


Thanks,

Martin GrÀßlin
Aaron J. Seigo
2013-02-14 13:07:29 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108957/#review27437
-----------------------------------------------------------


licensing wise: due to being released under LGPLv3, BAMF can only be used with GPLv2+ software or compatible. see: http://www.gnu.org/licenses/gpl-faq.html#AllCompatibility .. it seems that kwin is GPLv2+? if so, then that's fine, but should be checked.

otherwise, have you any idea about performance of BAMF? hitting disk to open .desktop files can be expensive, though hopefully it is done rarely, results are cached and BAMF does a good job of locating the .desktop file for a given window (cpu-wise)

- Aaron J. Seigo
Post by Martin Gräßlin
-----------------------------------------------------------
http://git.reviewboard.kde.org/r/108957/
-----------------------------------------------------------
(Updated Feb. 14, 2013, 12:02 p.m.)
Review request for kwin and Plasma.
Description
-------
Adding BAMF support to KWin
BAMF is a library used by Unity to match windows to their applications.
* better filtering on whether two Clients belong to the same application
* Using the application name as caption in case the window title is bad
* Getting better icons for window switcher/decorations, mostly important
for high resolution displays as icons provided through X property do
not include the large icons (e.g. 128x128)
* Using application name for application menu button
So far support is added to get the KDesktopFile for a Client and this is
exported to KWinEffects.
BAMF is probably also useful in other areas of the workspaces, e.g. for
libtaskmanager.
Diffs
-----
CMakeLists.txt 6084d7dd7655372506e02abe9f141b73155c5857
cmake/modules/CMakeLists.txt 8d3d58189dbcb9e89d4d9c9aa4f3c1c93abad5e4
cmake/modules/FindQtBAMF.cmake PRE-CREATION
config-workspace.h.cmake 4a2dcbf481bff35c3b05366a3d1a79bb1f400b88
kwin/CMakeLists.txt 2f44c57066913e05062bc1a3c3d8a03e924906dc
kwin/client.h 4cbc20f8e2b3aa31c1c33d63ae90f1f0c9eeefbf
kwin/client.cpp 2ce68fb4a0f108442b3476d39a90895bb1d12ffb
kwin/libkwineffects/kwineffects.h 464d7f2c3261c389dcf2349168b8d67cb691563a
kwin/libkwineffects/kwineffects.cpp 7d522d11e1cc71598e646c972c37f1af2275c3fc
Diff: http://git.reviewboard.kde.org/r/108957/diff/
Testing
-------
Thanks,
Martin GrÀßlin
Martin Gräßlin
2013-02-14 13:15:55 UTC
Permalink
Post by Aaron J. Seigo
Post by Aaron J. Seigo
licensing wise: due to being released under LGPLv3, BAMF can only be used with GPLv2+ software or compatible. see: http://www.gnu.org/licenses/gpl-faq.html#AllCompatibility .. it seems that kwin is GPLv2+? if so, then that's fine, but should be checked.
otherwise, have you any idea about performance of BAMF? hitting disk to open .desktop files can be expensive, though hopefully it is done rarely, results are cached and BAMF does a good job of locating the .desktop file for a given window (cpu-wise)
concerning licencing. Random KWin header file:
"This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version."
-> should be fine :-)
Post by Aaron J. Seigo
otherwise, have you any idea about performance of BAMF?
no I don't but I'd say if it's good enough for Unity it should probably be good enough for us :-)


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108957/#review27437
-----------------------------------------------------------
Post by Aaron J. Seigo
-----------------------------------------------------------
http://git.reviewboard.kde.org/r/108957/
-----------------------------------------------------------
(Updated Feb. 14, 2013, 1:02 p.m.)
Review request for kwin and Plasma.
Description
-------
Adding BAMF support to KWin
BAMF is a library used by Unity to match windows to their applications.
* better filtering on whether two Clients belong to the same application
* Using the application name as caption in case the window title is bad
* Getting better icons for window switcher/decorations, mostly important
for high resolution displays as icons provided through X property do
not include the large icons (e.g. 128x128)
* Using application name for application menu button
So far support is added to get the KDesktopFile for a Client and this is
exported to KWinEffects.
BAMF is probably also useful in other areas of the workspaces, e.g. for
libtaskmanager.
Diffs
-----
CMakeLists.txt 6084d7dd7655372506e02abe9f141b73155c5857
cmake/modules/CMakeLists.txt 8d3d58189dbcb9e89d4d9c9aa4f3c1c93abad5e4
cmake/modules/FindQtBAMF.cmake PRE-CREATION
config-workspace.h.cmake 4a2dcbf481bff35c3b05366a3d1a79bb1f400b88
kwin/CMakeLists.txt 2f44c57066913e05062bc1a3c3d8a03e924906dc
kwin/client.h 4cbc20f8e2b3aa31c1c33d63ae90f1f0c9eeefbf
kwin/client.cpp 2ce68fb4a0f108442b3476d39a90895bb1d12ffb
kwin/libkwineffects/kwineffects.h 464d7f2c3261c389dcf2349168b8d67cb691563a
kwin/libkwineffects/kwineffects.cpp 7d522d11e1cc71598e646c972c37f1af2275c3fc
Diff: http://git.reviewboard.kde.org/r/108957/diff/
Testing
-------
Thanks,
Martin GrÀßlin
Thomas Lübking
2013-02-14 13:45:47 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108957/#review27443
-----------------------------------------------------------


* better filtering on whether two Clients belong to the same application
The WM is supposed to have better information about that than the desktop service (group leader, class and eventually PID hint, which is mandatory for bamf anyway) -> rl usecase?

* Using the application name as caption in case the window title is bad
The title is handed by the application and while i admit to believe they add far too much stuff there: what's the actual usecase of a "bad window title" (even scummvm lost it's stupidity ;-)
-> rl usecase?
Aside this we can now script-a-fix particular titles.

* Getting better icons for window switcher/decorations, mostly important
for high resolution displays as icons provided through X property do
not include the large icons (e.g. 128x128)
This is probably the most relevant aspect, but i'd frankly consider _NET_WM_LOCAL_ICON_NAME more straightforward and less heuristic (did you look into the bamf sources? - special case strings all over the place. that's a hack-a-round, not a protocol)

* Using application name for application menu button
Since the client is supposed to know this information very precisely: why does it not export it alongsise appmenu?
For clients unaware of their name, see below on how to add window data information from the launcher.

Looking at bamf, it seems to double ksycoca but using dbus instead of shm, and then does some (cached) reverse lookup on the exec property.

Information should be hinted by the client, not guessed by the DE, but to take profit from the service launcher, passing additional process information onto windows could be done (by the service launcher, ie. KRun) by watching the PID of the launched exe and place it on either root (immediately) or client leader (watching for new windows) window and some info should be NETWM extensions (rasterizing the various icon sizes as theme-un-aware properties onto the window always seemed stupid enough, wastes space and bandwidth and does not integrate with the local environment in esp. the network case - or all others unless the applications notices the theme changed and updates the property. yeah.)

I frankly have no concept for the above ready (esp: "who'd forgets information in the root case") but am not convinced about the bamf approach.
It looks like some of my hack solutions in this regard, not anything like a proper solution.

- Thomas LÃŒbking
Post by Martin Gräßlin
-----------------------------------------------------------
http://git.reviewboard.kde.org/r/108957/
-----------------------------------------------------------
(Updated Feb. 14, 2013, 12:02 p.m.)
Review request for kwin and Plasma.
Description
-------
Adding BAMF support to KWin
BAMF is a library used by Unity to match windows to their applications.
* better filtering on whether two Clients belong to the same application
* Using the application name as caption in case the window title is bad
* Getting better icons for window switcher/decorations, mostly important
for high resolution displays as icons provided through X property do
not include the large icons (e.g. 128x128)
* Using application name for application menu button
So far support is added to get the KDesktopFile for a Client and this is
exported to KWinEffects.
BAMF is probably also useful in other areas of the workspaces, e.g. for
libtaskmanager.
Diffs
-----
CMakeLists.txt 6084d7dd7655372506e02abe9f141b73155c5857
cmake/modules/CMakeLists.txt 8d3d58189dbcb9e89d4d9c9aa4f3c1c93abad5e4
cmake/modules/FindQtBAMF.cmake PRE-CREATION
config-workspace.h.cmake 4a2dcbf481bff35c3b05366a3d1a79bb1f400b88
kwin/CMakeLists.txt 2f44c57066913e05062bc1a3c3d8a03e924906dc
kwin/client.h 4cbc20f8e2b3aa31c1c33d63ae90f1f0c9eeefbf
kwin/client.cpp 2ce68fb4a0f108442b3476d39a90895bb1d12ffb
kwin/libkwineffects/kwineffects.h 464d7f2c3261c389dcf2349168b8d67cb691563a
kwin/libkwineffects/kwineffects.cpp 7d522d11e1cc71598e646c972c37f1af2275c3fc
Diff: http://git.reviewboard.kde.org/r/108957/diff/
Testing
-------
Thanks,
Martin GrÀßlin
Martin Gräßlin
2013-02-18 08:18:24 UTC
Permalink
Post by Martin Gräßlin
Post by Martin Gräßlin
* better filtering on whether two Clients belong to the same application
The WM is supposed to have better information about that than the desktop service (group leader, class and eventually PID hint, which is mandatory for bamf anyway) -> rl usecase?
* Using the application name as caption in case the window title is bad
The title is handed by the application and while i admit to believe they add far too much stuff there: what's the actual usecase of a "bad window title" (even scummvm lost it's stupidity ;-)
-> rl usecase?
Aside this we can now script-a-fix particular titles.
* Getting better icons for window switcher/decorations, mostly important
for high resolution displays as icons provided through X property do
not include the large icons (e.g. 128x128)
This is probably the most relevant aspect, but i'd frankly consider _NET_WM_LOCAL_ICON_NAME more straightforward and less heuristic (did you look into the bamf sources? - special case strings all over the place. that's a hack-a-round, not a protocol)
* Using application name for application menu button
Since the client is supposed to know this information very precisely: why does it not export it alongsise appmenu?
For clients unaware of their name, see below on how to add window data information from the launcher.
Looking at bamf, it seems to double ksycoca but using dbus instead of shm, and then does some (cached) reverse lookup on the exec property.
Information should be hinted by the client, not guessed by the DE, but to take profit from the service launcher, passing additional process information onto windows could be done (by the service launcher, ie. KRun) by watching the PID of the launched exe and place it on either root (immediately) or client leader (watching for new windows) window and some info should be NETWM extensions (rasterizing the various icon sizes as theme-un-aware properties onto the window always seemed stupid enough, wastes space and bandwidth and does not integrate with the local environment in esp. the network case - or all others unless the applications notices the theme changed and updates the property. yeah.)
I frankly have no concept for the above ready (esp: "who'd forgets information in the root case") but am not convinced about the bamf approach.
It looks like some of my hack solutions in this regard, not anything like a proper solution.
I consider this as a review failed :-)

Let's try to get something better for the icons in KF 5 and if that works get it through NETWM.


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108957/#review27443
-----------------------------------------------------------
Post by Martin Gräßlin
-----------------------------------------------------------
http://git.reviewboard.kde.org/r/108957/
-----------------------------------------------------------
(Updated Feb. 14, 2013, 1:02 p.m.)
Review request for kwin and Plasma.
Description
-------
Adding BAMF support to KWin
BAMF is a library used by Unity to match windows to their applications.
* better filtering on whether two Clients belong to the same application
* Using the application name as caption in case the window title is bad
* Getting better icons for window switcher/decorations, mostly important
for high resolution displays as icons provided through X property do
not include the large icons (e.g. 128x128)
* Using application name for application menu button
So far support is added to get the KDesktopFile for a Client and this is
exported to KWinEffects.
BAMF is probably also useful in other areas of the workspaces, e.g. for
libtaskmanager.
Diffs
-----
CMakeLists.txt 6084d7dd7655372506e02abe9f141b73155c5857
cmake/modules/CMakeLists.txt 8d3d58189dbcb9e89d4d9c9aa4f3c1c93abad5e4
cmake/modules/FindQtBAMF.cmake PRE-CREATION
config-workspace.h.cmake 4a2dcbf481bff35c3b05366a3d1a79bb1f400b88
kwin/CMakeLists.txt 2f44c57066913e05062bc1a3c3d8a03e924906dc
kwin/client.h 4cbc20f8e2b3aa31c1c33d63ae90f1f0c9eeefbf
kwin/client.cpp 2ce68fb4a0f108442b3476d39a90895bb1d12ffb
kwin/libkwineffects/kwineffects.h 464d7f2c3261c389dcf2349168b8d67cb691563a
kwin/libkwineffects/kwineffects.cpp 7d522d11e1cc71598e646c972c37f1af2275c3fc
Diff: http://git.reviewboard.kde.org/r/108957/diff/
Testing
-------
Thanks,
Martin GrÀßlin
Loading...