About X11's WM_HINTS.UrgencyHint and KF5's NET::DemandsAttention

Martin Graesslin mgraesslin at kde.org
Fri Sep 5 12:41:03 BST 2014


On Wednesday 03 September 2014 14:36:48 Paulo Lieuthier wrote:
> Hello everyone,
> 
> I'm a LXQt contributor and I've been working on getting it rid of Xlib calls
> by using KF5's WindowSystem. It looks nice so far.
> 
> The problem I'm having now is that I can't get the taskbar to indicate a
> window needs attention by using the KWindowInfo class.
> 
> This is how it worked before:
> 
>         XWMHints *hints = XGetWMHints(QX11Info::display(), window);
>         ...
>         bool urgencyHint = hints->flags & UrgencyHint;
>         ...
> 
> And that's how I've been trying:
> 
>         KWindowInfo info(window, NET::WMState | NET::XAWMState);
>         bool urgencyHint = info.hasState(NET::DemandsAttention);
> 
> Isn't NET::DemandsAttention supposed to be equal to WM_HINTS.UrgencyHint?
> What am I missing?

no, it's the netwm state for demands attention, see [1]. I just also looked 
into KWin code and it doesn't use KWindowInfo or the underlying NET classes 
for reading the urgency hint.

Cheers
Martin

[1] http://standards.freedesktop.org/wm-spec/wm-spec-1.4.html#idm139915842396784
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20140905/8bba1c70/attachment.sig>


More information about the kde-core-devel mailing list