mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
xwayland: Check for X11 unix directory only once
The function choose_xdisplay() calls open_display_sockets() which calls ensure_x11_unix_dir(). We don't need to do that from within the loop though, as the directory /tmp/.X11-unix is the same regardless of the display number. Move the call to ensure_x11_unix_dir() from open_display_sockets() to choose_xdisplay() prior to enter the display loop. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1669>
This commit is contained in:
parent
1bd42e8779
commit
f6b4665b02
@ -649,9 +649,6 @@ open_display_sockets (MetaXWaylandManager *manager,
|
|||||||
{
|
{
|
||||||
int abstract_fd, unix_fd;
|
int abstract_fd, unix_fd;
|
||||||
|
|
||||||
if (!ensure_x11_unix_dir (error))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
abstract_fd = bind_to_abstract_socket (display_index, fatal, error);
|
abstract_fd = bind_to_abstract_socket (display_index, fatal, error);
|
||||||
if (abstract_fd < 0)
|
if (abstract_fd < 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -684,6 +681,9 @@ choose_xdisplay (MetaXWaylandManager *manager,
|
|||||||
else if (g_getenv ("RUNNING_UNDER_GDM"))
|
else if (g_getenv ("RUNNING_UNDER_GDM"))
|
||||||
display = 1024;
|
display = 1024;
|
||||||
|
|
||||||
|
if (!ensure_x11_unix_dir (error))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
g_autoptr (GError) local_error = NULL;
|
g_autoptr (GError) local_error = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user