aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg V <greg@unrelenting.technology>2017-11-22 15:57:05 +0300
committerGreg V <greg@unrelenting.technology>2017-11-22 16:29:31 +0300
commit1ae944c07189b54d5d7458a2d0efaa39fbbac457 (patch)
treedc5c6897d27469190d8ac3f9f311ce67e03c26dc
parent71aa634ac501389b5c0c02fa0fed2ea08ca9f350 (diff)
Use SIGUSR2 for vt switching instead of SIGUSR1
Xwayland uses SIGUSR1 to signal readiness. With direct(-freebsd) session and Xwayland, wlroots was confusing the Xwayland readiness signal with a vt switch signal, freezing the desktop. Same problem was found in Weston in 2014: https://phabricator.freedesktop.org/T7080
-rw-r--r--backend/session/direct-freebsd.c6
-rw-r--r--backend/session/direct.c6
-rw-r--r--xwayland/sockets.c2
3 files changed, 8 insertions, 6 deletions
diff --git a/backend/session/direct-freebsd.c b/backend/session/direct-freebsd.c
index fc4bab04..c0621416 100644
--- a/backend/session/direct-freebsd.c
+++ b/backend/session/direct-freebsd.c
@@ -148,8 +148,8 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
struct vt_mode mode = {
.mode = VT_PROCESS,
- .relsig = SIGUSR1,
- .acqsig = SIGUSR1,
+ .relsig = SIGUSR2,
+ .acqsig = SIGUSR2,
.frsig = SIGIO, // has to be set
};
@@ -159,7 +159,7 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
}
struct wl_event_loop *loop = wl_display_get_event_loop(display);
- session->vt_source = wl_event_loop_add_signal(loop, SIGUSR1,
+ session->vt_source = wl_event_loop_add_signal(loop, SIGUSR2,
vt_handler, session);
if (!session->vt_source) {
goto error;
diff --git a/backend/session/direct.c b/backend/session/direct.c
index 942dc552..9d6cd36d 100644
--- a/backend/session/direct.c
+++ b/backend/session/direct.c
@@ -184,8 +184,8 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
struct vt_mode mode = {
.mode = VT_PROCESS,
- .relsig = SIGUSR1,
- .acqsig = SIGUSR1,
+ .relsig = SIGUSR2,
+ .acqsig = SIGUSR2,
};
if (ioctl(fd, VT_SETMODE, &mode) < 0) {
@@ -194,7 +194,7 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
}
struct wl_event_loop *loop = wl_display_get_event_loop(display);
- session->vt_source = wl_event_loop_add_signal(loop, SIGUSR1,
+ session->vt_source = wl_event_loop_add_signal(loop, SIGUSR2,
vt_handler, session);
if (!session->vt_source) {
goto error;
diff --git a/xwayland/sockets.c b/xwayland/sockets.c
index 1bddd20f..2119056d 100644
--- a/xwayland/sockets.c
+++ b/xwayland/sockets.c
@@ -21,7 +21,9 @@
static const char *lock_fmt = "/tmp/.X%d-lock";
static const char *socket_dir = "/tmp/.X11-unix";
static const char *socket_fmt = "/tmp/.X11-unix/X%d";
+#ifndef __linux__
static const char *socket_fmt2 = "/tmp/.X11-unix/X%d_";
+#endif
static int open_socket(struct sockaddr_un *addr, size_t path_size) {
int fd, rc;