[External] : Re: Automated testing with XTEST wired to the libEI
Olivier Fourdan
ofourdan at redhat.com
Tue Mar 25 09:52:56 UTC 2025
Hi Alexander,
On Tue, Mar 18, 2025 at 9:09 AM Olivier Fourdan <ofourdan at redhat.com> wrote:
> On Tue, Mar 18, 2025 at 12:33 AM Alexander Zvegintsev <
> alexander.zvegintsev at oracle.com> wrote:
>
>> Do I understand correctly that there is no restore token functionality
>> available for plain XTestFake* calls,
>>
>
> More or less, what I am saying is that when using XTEST, the client which
> actually connects to EI is Xwayland itself, on behalf of the X11
> application who "speaks" X11 only, but Xwayland doesn't support the restore
> tokens so the portal dialog will show up.
>
> Xwayland keeps the connection to EI active for a period of time so that
> the portal dialog does not show up continuously for every single XTEST
> request however.
>
> That is also a reason having restore tokens might not be desirable for
> Xwayland, because Xwayland acts on behalf of the X11 clients and reusing
> restore tokens would be like giving full unrestricted access to *any* X11
> client, any time.
>
>
>> and you suggest not using the XTEST and using one of the following for
>> mouse/keyboard control?
>>
>
> No, I was thinking of optionally disabling the XTEST / EI connection for
> Xwayland in mutter (as mutter spawns Xwayland) as a temporary workaround
> so that XTEST still works for X11 applications.
>
>>
>> - org.freedesktop.portal.RemoteDesktop.ConnectToEIS and use libei
>> sendercontext
>> - org.freedesktop.portal.RemoteDesktop.NotifyPointerMotionAbsolute /
>> NotifyPointerButton /NotifyPointerAxisDiscrete / NotifyKeyboardKeycode / etc
>>
>> I quickly tried the latter and it seems to work fine on OEL 10 as
>> expected.
>>
> Right, I guess you could work around the problem like that, but that means
> you have specific code paths in Wakefiled even for the X11 / Xwayland case,
> maybe that's OK for you. ~~But that could be seen as a hack as well,
> abusing the RemoteDesktop API~~.
>
Sorry, I realize what I wrote in that sentence above is plain wrong, the
RemoteDesktop API is the one to use indeed, if that's something you're
willing to implement in Wakefiled directly (and not rely on X11 XTEST).
> Anyway, if you want to have an option in mutter to not Xwayland with EI
> support (the temporary workaround you mentioned), best would be to file an
> issue against mutter upstream [1] as usual and we can work from there.
>
Sorry again ,
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/wakefield-dev/attachments/20250325/4af6dd34/attachment.htm>
More information about the wakefield-dev
mailing list