graesslin added inline comments.

INLINE COMMENTS

> davidedmundson wrote in keyboard_layout.cpp:165
> so KToolInvocation::startServiceByName()?

yes, except that we used to use KToolInvocation and ported away from it. 
Something - in the case of KWin - doesn't work for it. The standard case of 
KWin is special. You can see it with the line below. We create a Process, not a 
QProcess. It's a specialized class to do KWin specific adjustments. Sometimes 
KWin is meh.

> davidedmundson wrote in keyboard_layout.cpp:182
> You probably don't want to be doing this.
> 
> SNI has two two code paths for menus.
> 
> addAction() which works the way you'd expect creating a DBus menu and sending 
> that
> 
> setContextMenu is a more legacy version that gets a signal from Plasma to 
> show a menu, then kwin's process does the actual showing of it. (and 
> generally speaking doing that won't work on wayland..it might be an exception 
> here)
> 
> Given you want a flat list, use m_notifierItem->addAction(..)  even for the 
> separator.

uh nice, didn't know that and followed the existing code too blindly.

REPOSITORY
  R108 KWin

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #kwin, #plasma_on_wayland
Cc: davidedmundson, luebking, plasma-devel, kwin, lesliezhai, ali-mohamed, 
hardening, jensreuterberg, abetts, eliasp, sebas

Reply via email to