Review Request 119267: Adding KWindowSystem::setOnActivities(WId win, const QStringList &activities) method

Martin Gräßlin mgraesslin at kde.org
Mon Aug 11 07:37:22 UTC 2014



> On July 31, 2014, 2:03 p.m., Thomas Lübking wrote:
> > src/kwindowinfo_x11.cpp, line 305
> > <https://git.reviewboard.kde.org/r/119267/diff/2/?file=292848#file292848line305>
> >
> >     Any chance we can make this a function return in netwm.h to be used by the lib, kactivities and kwin and plasma and whoever else?
> >     
> >     NETWM::allActivityUUID() or so?
> 
> Ivan Čukić wrote:
>     The problem is that the null uuid is not really meant to be visible to the outside world. So, while the kwindowsystem can have the relevant definition in a single location and refered from the two places it is currently present in (src/netwm.cpp and this), it should not be visible from the outside world. That is the reason for the above check - if the window has null uuid for activity, and empty string list is returned by the method.
>     
>     All the clients of kwindowsystem should be able to be implemented without knowing that null uuid is a special value.
>     
>     For kactivities, the value is used only if the daemon is not running - in that case, the library returns a single activity (because we need to have at least one at all times to avoid special cases in all clients) whose id is null uuid. Still, most clients should have no idea that it is not a proper activity.
>     
>     In kwin, it was used since (as usual, alongside plasma) kwin is 1% and null uuid was suitable to represent 'all activities' with or without kactivitymanagerd running.
> 
> Thomas Lübking wrote:
>     supersecret netwm.h
>     #define KDE_ALL_ACTIVITY_UUID "00000000-0000-0000-0000-000000000000"
>     ?
>     
>     What I basically do not like about this string is that several components need to silently agree on a certain string (w/o any compiletime sanity check) - and this particular one also is easily broken (nobody will notice that there's a "0" too few or much ;-)

I think exposing a method in NETWM would be fine. It's API nobody should use - it's X11 specific and too low level for anybody except KWin and KWindowSystem to use. Export it, mark it as internal and if it changes KWin will have been warned ;-)


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119267/#review63557
-----------------------------------------------------------


On Aug. 7, 2014, 7:15 a.m., Ivan Čukić wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119267/
> -----------------------------------------------------------
> 
> (Updated Aug. 7, 2014, 7:15 a.m.)
> 
> 
> Review request for KDE Frameworks, kwin and Martin Gräßlin.
> 
> 
> Repository: kwindowsystem
> 
> 
> Description
> -------
> 
> Currently, the library only has the method for retrieving a list of activities a window belongs to.
> 
> This is adding a method which provides changing the list of activities for a window.
> 
> 
> Diffs
> -----
> 
>   autotests/kwindowinfox11test.cpp 50ce806 
>   src/kwindowinfo_x11.cpp 041dfd3 
>   src/kwindowsystem.h 0b58e71 
>   src/kwindowsystem.cpp fb59603 
>   src/kwindowsystem_p.h 8861844 
>   src/kwindowsystem_p_x11.h 9baa6ae 
>   src/kwindowsystem_x11.cpp 2016820 
>   src/netwm.h 2d812a7 
>   src/netwm.cpp 1daad1e 
>   src/netwm_p.h a201cb6 
> 
> Diff: https://git.reviewboard.kde.org/r/119267/diff/
> 
> 
> Testing
> -------
> 
> Yes, works with the new activity switcher.
> 
> 
> Thanks,
> 
> Ivan Čukić
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140811/395bf3d1/attachment.html>


More information about the Kde-frameworks-devel mailing list