Xwayland on demand (Re: [PATCH xwayland 3/3] xwayland: Handle the case of windows being realized before redirection)

Pekka Paalanen ppaalanen at gmail.com
Wed Jan 16 08:35:13 UTC 2019


On Tue, 15 Jan 2019 23:21:05 +0100
Carlos Garnacho <carlosg at gnome.org> wrote:

> If Xwayland gets to realize a window meant for composition before the
> compositor redirected windows (i.e. redirect mode is not RedirectDrawManual
> yet), the window would stay "invisible" as we wouldn't create a
> wl_surface/wl_shell_surface for it at any later point.
> 
> This scenario may happen if the wayland compositor raises Xwayland on
> demand for a X11 client being started. In this case the first data on
> the socket is the client's, the compositor can hardly beat that in
> order to redirect subwindows before the client realizes a Window.
> 
> In order to handle this case, allow the late creation of a matching
> (shell) surface for the WindowPtr on SetWindowPixmapProc, so it is ensured
> to be created after the compositor set up redirection.
> 
> Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
> ---
>  hw/xwayland/xwayland.c | 37 +++++++++++++++++++++++++++++++++++++
>  hw/xwayland/xwayland.h |  1 +
>  2 files changed, 38 insertions(+)

Hi Carlos,

this reminds me of other ordering issues with starting Xwayland on
demand: xrdb. I presume the X resources should be merged before any app
X11 client is processed, so that they see the user's resources at
start-up. AFAIK, that cannot happen if Xwayland is started on-demand.
Either it is too late if app start-up triggers it, or then you launch
Xwayland at desktop start-up, essentially not doing on-demand anymore.
Have you seen people complain about that?

Could that be fixed somehow?

Pass the X11 app socket to Xwayland later after the XWM init is
complete? Stall non-XWM clients inside Xwayland by default until XWM is
ready?


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.x.org/archives/xorg-devel/attachments/20190116/70a5f2ce/attachment.sig>


More information about the xorg-devel mailing list