[mutter] xwayland: Check for X11 unix directory only once
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] xwayland: Check for X11 unix directory only once
- Date: Thu, 21 Jan 2021 13:06:57 +0000 (UTC)
commit f6b4665b02fb295b0ca034766eb9075da5f17b8e
Author: Olivier Fourdan <ofourdan redhat com>
Date: Wed Jan 13 18:28:46 2021 +0100
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>
src/wayland/meta-xwayland.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 56a50b1347..7dc7077f63 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -649,9 +649,6 @@ open_display_sockets (MetaXWaylandManager *manager,
{
int abstract_fd, unix_fd;
- if (!ensure_x11_unix_dir (error))
- return FALSE;
-
abstract_fd = bind_to_abstract_socket (display_index, fatal, error);
if (abstract_fd < 0)
return FALSE;
@@ -684,6 +681,9 @@ choose_xdisplay (MetaXWaylandManager *manager,
else if (g_getenv ("RUNNING_UNDER_GDM"))
display = 1024;
+ if (!ensure_x11_unix_dir (error))
+ return FALSE;
+
do
{
g_autoptr (GError) local_error = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]