On Thu, Nov 26, 2020 at 02:53:05PM -0500, gherissi ayachi wrote: > Hi, > > Background: our library allow to grab video to a supplied windows handle, > When using X11 the user pass the XID to the lib > > and we can paint to this Window and do some interaction (pointer), All is > done in the same process. > > In Wayland, The user has to provide us with his wl_display and wl_surface > and we have to use subsurface to do the paint right ?
By using subsurfaces, you can tie one surface to anothor, making them appear as one, and it sounds like this is something that would fit your use case. Note that both your library, and the user of the library must share the same wl_display connection; you cannot tie one surface of one client with a surface of another, using subsurfaces, if they don't share the same Wayland connection. > > what about pointer events (motion and button). Each subsurface can set their own input region, and the compositor will route the input events accordingly. Do make note of things like implicit pointer button grabs, that may apply. If this is not enough, you need some way to pass internal input event within your process, not involving Wayland. For example if your parent window receives all input events, and the subsurfaces none, the framework managing the main surface needs to pass some internal input event representation to the owner of the subsurface using some API understood by both parties. Jonas > > Thank's > > _______________________________________________ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel