wayland: Create XAuthority file once

Where the prepare_auth_file() call is, it does create a new one on every
respawn of Xwayland. This is not benefitial, as the XAUTHORITY envvar is
already fixed in the session.

Only create the XAuthority file once, and reuse it on future Xwayland
respawns.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/728
This commit is contained in:
Carlos Garnacho 2019-08-13 20:52:34 +02:00
parent d20f6c7969
commit e9e28baab7

View File

@ -743,6 +743,9 @@ meta_xwayland_init (MetaXWaylandManager *manager,
{ {
if (!choose_xdisplay (manager)) if (!choose_xdisplay (manager))
return FALSE; return FALSE;
if (!prepare_auth_file (manager))
return FALSE;
} }
else else
{ {
@ -750,9 +753,6 @@ meta_xwayland_init (MetaXWaylandManager *manager,
return FALSE; return FALSE;
} }
if (!prepare_auth_file (manager))
return FALSE;
manager->wayland_display = wl_display; manager->wayland_display = wl_display;
policy = meta_get_x11_display_policy (); policy = meta_get_x11_display_policy ();