Translation of click events to touch events in kwin.

Martin Graesslin mgraesslin at kde.org
Thu Jun 9 06:05:50 UTC 2016


On Wednesday, June 8, 2016 9:58:28 PM CEST Bhavisha Dhruve wrote:
> I now properly understood the actual idea, and how I will have to use
> FakeInput interface, to sum up there will be QtQuick component, which will
> be used by Plasma mobile emulator to embed KWin inside emulator window.

yep

> 
> > Option 1 might be easier right now as we already have everything for that
> > in
> > place.
> 
> I really have no idea on which of the two solution you proposed will be
> good choice, so can you please explain one which you think will be best in
> details?
> 
> > If the whole thing sounds somewhat sane to you I can explain in more
> > detail
> > how that could work.

Ok, I'm now trying to outline how such a QtQuick component needs to be 
implemented.

Basically the QQuickItem needs to create an anonymous Wayland server. The key 
for that is in the KWayland repository and there is already an example 
provided in src/tools/testserver

So the important things are:
* create a KWayland::Server::Display which is setup to use ConnectClientsOnly
* it uses createClient on an anonymous socketpair
* it needs to create at least the following interfaces:
 ** shm
 ** compositor
 ** seat (with at least touch)
 ** shell
 ** output which has a size mapped to the size of the QQuickItem
* it starts kwin_wayland with WAYLAND_SOCKET passed to the socket pair

I think that's already quite a list, so I stop here for the moment. This 
should be sufficient to get a nested kwin_wayland started. How to get it to 
render and how to get input in is then something we need to look into once we 
reached that stage (might also mean that I need to experiment a little bit 
with the code ;-)

Cheers
Martin
-------------- 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/plasma-devel/attachments/20160609/1dead7c5/attachment.sig>


More information about the Plasma-devel mailing list