Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

xwayland: add support for -noTouchPointerEmulation #3289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/wlr/xwayland.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct wlr_xwayland_cursor;
struct wlr_xwayland_server_options {
bool lazy;
bool enable_wm;
bool no_touch_pointer_emulation;
};

struct wlr_xwayland_server {
Expand Down
4 changes: 4 additions & 0 deletions include/xwayland/meson.build
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
have_listenfd = false
have_no_touch_pointer_emulation = false
if xwayland.found()
xwayland_path = xwayland.get_variable('xwayland')
have_listenfd = xwayland.get_variable('have_listenfd') == 'true'
have_no_touch_pointer_emulation = xwayland.get_variable(
'have_no_touch_pointer_emulation') == 'true'
else
xwayland_path = xwayland_prog.full_path()
endif

xwayland_config_data = configuration_data()
xwayland_config_data.set_quoted('XWAYLAND_PATH', xwayland_path)
xwayland_config_data.set10('HAVE_XWAYLAND_LISTENFD', have_listenfd)
xwayland_config_data.set10('HAVE_XWAYLAND_NO_TOUCH_POINTER_EMULATION', have_no_touch_pointer_emulation)
configure_file(
output: 'config.h',
configuration: xwayland_config_data,
Expand Down
8 changes: 8 additions & 0 deletions xwayland/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ noreturn static void exec_xwayland(struct wlr_xwayland_server *server) {
argv[i++] = wmfd;
}

#if HAVE_XWAYLAND_NO_TOUCH_POINTER_EMULATION
if (server->options.no_touch_pointer_emulation) {
argv[i++] = "-noTouchPointerEmulation";
}
#else
server->options.no_touch_pointer_emulation = false;
#endif

argv[i++] = NULL;

assert(i < sizeof(argv) / sizeof(argv[0]));
Expand Down