Xwayland on demand (Re: [PATCH xwayland 3/3] xwayland: Handle the case of windows being realized before redirection)
Matthieu Herrb
matthieu at herrb.eu
Wed Jan 16 09:47:44 UTC 2019
On Wed, Jan 16, 2019 at 10:35:13AM +0200, Pekka Paalanen wrote:
> 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?
Hi,
At least for traditional Xlib/Xt applications, The ~/.Xdefaults file is
read by applications. It's less efficient than having resouces loaded
in the X server by xrdb, but you can always link .Xdefaults to
.Xresources for this kind of situation.
Not sure if Gtk/Qt/whatever use the Xlib functions or if they have
their own code that would ignore .Xdefaults.
--
Matthieu Herrb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20190116/8543fd10/attachment.sig>
More information about the xorg-devel
mailing list