D10337: First approach to a plasmoid that can display the state of caps lock
Martin Flöser
noreply at phabricator.kde.org
Tue Feb 6 16:10:22 UTC 2018
graesslin added a comment.
In https://phabricator.kde.org/D10337#202007, @apol wrote:
> In https://phabricator.kde.org/D10337#201998, @graesslin wrote:
>
> > Please be aware that this will not work on Wayland. The modifier state is only available to the window which currently has keyboard focus. We either need a dedicated Wayland protocol to send all modifier changes to Plasma or some other way to have KWin feed in the state.
> >
> > Anyway: I would recommend to make it only available for platform xcb right now.
>
>
> Note this is using a Plasma Data Engine that is used by several plasmoids and components throughout plasma. In turn, we should make sure that if the data engine doesn't have any data, it doesn't work.
> Or have the data engine work on Wayland.
The data engine can partially work. If you are interested only in the data engine while you have keyboard focus, it actually does work [1]. An example would be the lockscreen which uses the data engine and has keyboard focus.
The concept of this data engine just doesn't match the Wayland world: there are no global keyloggers. KWayland::Server could send the modifier changes to all applications, but this would on the one side trigger wakeups whenever a modifier changes for all applications (bad) or in the worst case even trigger crashes in applications as they don't expect modifier changes when not having keyboard focus.
So in summary: it depends a lot on what the use case for the engine is. This plasmoid unfortunately is an example for a usage pattern which does not work in a Wayland world. The only possibility I see is exposing a DBus service in KWin and have the data engine talk to it, but this would mean it's kwin dependent and still doesn't work on Wayland in general.
[1] KModifierKeyInfo doesn't support Wayland yet, so in practice it doesn't work
REPOSITORY
R114 Plasma Addons
REVISION DETAIL
https://phabricator.kde.org/D10337
To: apol, #plasma, jriddell
Cc: graesslin, abetts, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180206/ad067d45/attachment-0001.html>
More information about the Plasma-devel
mailing list