xwayland: Fix wm_fd readin with no listen_fds

Since 08843efc KWin was not able to start a Wayland session. Independently
of listen_fd_count add_client_fd must be called. Same holds for the
wm_selection_callback. Therefore just remove the condition.

Bugzilla: https://bugs.freedesktop.org/109220

Signed-off-by: Roman Gilg <subdiff@gmail.com>
This commit is contained in:
Roman Gilg 2019-01-02 21:55:23 +01:00
parent 7fb6338c68
commit bf5613f888

View File

@ -95,7 +95,7 @@ ddxUseMsg(void)
static int wm_fd = -1;
static int listen_fds[5] = { -1, -1, -1, -1, -1 };
static int listen_fd_count;
static int listen_fd_count = 0;
int
ddxProcessArgument(int argc, char *argv[], int i)
@ -1165,12 +1165,10 @@ InitOutput(ScreenInfo * screen_info, int argc, char **argv)
LocalAccessScopeUser();
if (listen_fd_count > 0) {
if (wm_fd >= 0) {
TimerSet(NULL, 0, 1, add_client_fd, NULL);
AddCallback(&SelectionCallback, wm_selection_callback, NULL);
} else {
listen_on_fds();
}
if (wm_fd >= 0) {
TimerSet(NULL, 0, 1, add_client_fd, NULL);
AddCallback(&SelectionCallback, wm_selection_callback, NULL);
} else if (listen_fd_count > 0) {
listen_on_fds();
}
}