- We do not need the return type. If a plugin declares it can handle the
packet it should do so. We don't have any fallback logic in place and
the packet types are namespaced with the plugin IDs anyway.
- Provide a default implementation with a warning, not all plugins need
to overwrite this
Summary:
Fixes T6701
The reason it did not work before is that the "Keyboard" did not report itself as available.
Test Plan:
Type in plasmoid on one Desktop, see text on another.
Note that no ack packets are sent, so the text does not appear in the original input text field. I want to await the discussion in D12670 before doing that
Reviewers: apol
Reviewed By: apol
Subscribers: mtijink, kdeconnect
Tags: #kde_connect
Maniphest Tasks: T6701
Differential Revision: https://phabricator.kde.org/D12812
Summary:
Windows no longer needs a separate plugin, and X11 and Wayland are now in
separate files instead of having lots of ifdefs.
Test Plan: Tested on X11, Wayland and Windows.
Reviewers: #kde_connect, apol, nicolasfella
Reviewed By: #kde_connect, apol, nicolasfella
Subscribers: apol, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D11692
Summary: KDE Connect, now with correct naming!
Test Plan: It still builds.
Reviewers: #kde_connect, apol, nicolasfella
Reviewed By: #kde_connect, apol, nicolasfella
Subscribers: nicolasfella
Differential Revision: https://phabricator.kde.org/D11036
Summary:
Change all member variables to the form m_fooBar because it is the preferred form in Qt (it was half and half between this and mFooBar, and a minority didn't have anything).
Place all references and pointers on the side of the type since it is the majority.
Basically:
- mFoo -> m_foo
- foo -> m_foo (if it is a member variable)
- Type &ref -> Type& ref
- Type *ptr -> Type* ptr
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, nicolasfella, albertvaka
Subscribers: albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D7312
KWayland provides a FakeInput interface which KWin as a compositor
supports. This can be used to fake input events on Wayland. As it's
a KWin specific interface it won't work with other Wayland compositors.
If the compositor does not support the required interface, the
module just doesn't do anything. Support in the implementation is
completely optional.
Adding fake input events circumvents the Wayland security model.
Because of that the interface is designed in a way that the security
decision can be done by the compositor and can be delegated to the
user.
On first input event kdeconnect tries to "authenticate" with the
compositor. This gives the compositor the possibility to e.g. ask
the user whether it should be allowed. It's not done on startup or
of load module as that would show such a message way to early and
the user would not be able to connect it with his action on the
smartphone.
REVIEW: 124238
Don't open a second Display, we can use the one used by Qt.
Advantages are: we are on the correct Display, we don't open a Display
connection on e.g. Wayland (it would succeed but not work as a connection
to Xwayland would be opened) and we can drop the copy of fixx11h.
It's also a prerequisite to properly split the implementation to support
Wayland in a later change.
REVIEW: 124230
This meant to add a lot of dependencies to each plugin since we had
KDELibs4support as PUBLIC link meaning that anything linking against
kdeconnectcore was linking at the same time to mostly all frameworks.
Now each plugin has more or less its dependencies in the CMake some
still depend on KDELibs4Support.
For the mousepad plugin I needed to add a fixX11.h file that basically
undefines/defines again some stuff xlib has that conflcits with normal
C++ and Qt.
Before it was not conflicting because some lib within KDELibs4Support
was including this file, but now we have to do it ourselves.
I've also removed modifiers like Shift and Ctrl by now.
LibFakeKey is now a dependency of this plugin, as it allows us to send UTF
characters as X11 keys in a simple and convenient way. Internally it uses a
convention in Xlib, that allows to pass UTF characters as keycodes just by
adding 0x01000000 to the keycode number.
CCMAIL: saiarcot895@gmail.com