Review Request 120217: KWindowInfo::state can map urgency to NET::DemandsAttention

Martin Gräßlin mgraesslin at kde.org
Tue Sep 16 07:48:16 UTC 2014



> On Sept. 16, 2014, 12:28 a.m., Thomas Lübking wrote:
> > If we merge, we should imo merge in NetWinInfo - having the same function return different values in NetWinInfo and KWindowInfo feels wrong.
> 
> Martin Gräßlin wrote:
>     I considered it, but decided against it as I consider NETWinInfo to be a level lower to X and exposing it directly. KWindowInfo on the other hand is a convenient wrapper.
> 
> Thomas Lübking wrote:
>     extra function ::demandsAttention()?
> 
> Martin Gräßlin wrote:
>     as in
>     bool KWindoInfo::demandsAttention() const {
>         return hasState(NET::DemandsAttention) || info->urgency();
>     }
> 
> Thomas Lübking wrote:
>     Yes. I simply prospect confusion if the very same signature and return function in NetWinInfo and KWindowInfo behave differently.
>     (It would probably be different if NetWinInfo would strictly only handle NETWM, but there're various icccm related functions in it as well)

I'll discard the change modulo the unit test. KWin and openbox set demands attention on urgency. Ergo just using hasState(NET::DemandsAttention) covers the Urgency state.


- Martin


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


On Sept. 15, 2014, 3:29 p.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120217/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2014, 3:29 p.m.)
> 
> 
> Review request for KDE Frameworks and kwin.
> 
> 
> Repository: kwindowsystem
> 
> 
> Description
> -------
> 
> If WM2Urgency is passed to the ctor of KWindowInfo, ::state() checks
> the urgency state is set and adds NET::DemandsAttention. This allows
> to easily check whether the window demands attention either through
> EWMH or ICCCM.
> 
> The change does not affect existing code as one has to explicitly
> pass WM2Urgency and this one is new in 5.3, too.
> 
> This change only affects platform X11.
> 
> CHANGELOG: KWindowInfo::state can map urgency to NET::DemandsAttention
> 
> 
> Diffs
> -----
> 
>   autotests/kwindowinfox11test.cpp 3ff6a49447a99d9afdabe6c96361b276083de525 
>   src/kwindowinfo.h b00e115f293231b661934d20e97be4d186f679de 
>   src/kwindowinfo_x11.cpp 2a32692a0f664d6a9884e6d1a1209e88e02944ec 
> 
> Diff: https://git.reviewboard.kde.org/r/120217/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140916/3e2fd41b/attachment.html>


More information about the Kde-frameworks-devel mailing list