D8416: really raising window when shown from systray

Martin Koller noreply at phabricator.kde.org
Sun Oct 22 12:47:01 UTC 2017


mkoller added inline comments.

INLINE COMMENTS

> graesslin wrote in kstatusnotifieritem.cpp:653
> Please read the documentation of this API call. It is not meant for applications to use this!
> 
> Please also note that this won't work on Wayland at all.
> 
> The proper way is to ask the systray to raise the window, which then talks to the window manager / wayland compositor to activate it.
> 
> Activating from client side is nothing else than focus stealing. If that code worked it means KWin's focus stealing prevention is buggy.

This code change will work as good as the other part of this file in wayland, since just about 30 lines below my change you find exactly the same 2 lines of code.
Check the "else" branch in case the window is already mapped.

So why is the existing code correct but my change not ?

"The proper way is to ask the systray to raise the window, ..."
In my case, I AM the systray (I implement my own systray) and what I do when the Status Notifier Item is clicked, I just call the DBus interface class method Activate(pos.x(), pos.y());
What's wrong with this approach ?
Do you say it's the SysTray which should call these 2 lines I added ?
I think the SysTray should not even know that the client application shows a window when the status notifier item was clicked. It just asks for the "Activate" action - whatever the client does with that.

"If that code worked it means KWin's focus stealing prevention is buggy."
Then it's buggy since it works. (my setting is "Low")

REPOSITORY
  R289 KNotifications

REVISION DETAIL
  https://phabricator.kde.org/D8416

To: mkoller, davidedmundson, graesslin
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171022/a1c9aad5/attachment.html>


More information about the Kde-frameworks-devel mailing list