#!/bin/bash
# Pocket DS — launch Onboard.
#
# Run under XWayland (GDK_BACKEND=x11): there Onboard uses its native
# XInput2 touch/click handling (reliable taps via the xwayland-touch
# device and the CSFloatingSlave click simulator), instead of the lossy
# GTK touch fallback it falls back to on a pure-Wayland GDK display.
# Key injection still uses the uinput backend (ONBOARD_BACKEND=uinput),
# which is display-independent, so typed keys reach every app globally.
export GDK_BACKEND=x11
export DISPLAY="${DISPLAY:-:0}"
export ONBOARD_BACKEND=uinput
exec /usr/bin/onboard "$@"
