Skip to content

Commit

Permalink
feat: Support multitouch in Waydroid (Thanks Aru!)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Feb 2, 2024
1 parent 1b89f6d commit 463f206
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ RUN rpm-ostree install \
rocm-opencl \
rocm-clinfo \
waydroid \
weston && \
cage \
wlr-randr && \
sed -i~ -E 's/=.\$\(command -v (nft|ip6?tables-legacy).*/=/g' /usr/lib/waydroid/data/scripts/waydroid-net.sh

# Cleanup & Finalize
Expand Down Expand Up @@ -544,7 +545,6 @@ RUN /tmp/image-info.sh && \
; fi && \
systemctl disable waydroid-container.service && \
sed -i 's@Exec=waydroid first-launch@Exec=/usr/bin/waydroid-launcher first-launch\nX-Steam-Library-Capsule=/usr/share/applications/Waydroid/capsule.png\nX-Steam-Library-Hero=/usr/share/applications/Waydroid/hero.png\nX-Steam-Library-Logo=/usr/share/applications/Waydroid/logo.png\nX-Steam-Library-StoreCapsule=/usr/share/applications/Waydroid/store-logo.png\nX-Steam-Controller-Template=Desktop@g' /usr/share/applications/Waydroid.desktop && \
rm /usr/share/wayland-sessions/weston.desktop && \
wget https://raw.githubusercontent.com/KyleGospo/waydroid-scripts/main/waydroid-choose-gpu.sh -O /usr/bin/waydroid-choose-gpu && \
chmod +x /usr/bin/waydroid-choose-gpu && \
mkdir -p /usr/etc/default && \
Expand Down
11 changes: 2 additions & 9 deletions system_files/desktop/shared/usr/bin/waydroid-launcher
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ fi
# Launch Weston
killall -9 weston
pkexec /usr/libexec/waydroid-container-start
if [ -z "$(pgrep weston)" ]; then
/usr/bin/weston --socket=weston-waydroid --width=${STEAMOS_NESTED_DESKTOP_WIDTH:-1280} --height=${STEAMOS_NESTED_DESKTOP_HEIGHT:-800} &> /dev/null &
if [ -z "$(pgrep wlr-randr)" ]; then
cage -- bash -c "wlr-randr --output X11-1 --custom-mode ${STEAMOS_NESTED_DESKTOP_WIDTH:-1280}x${STEAMOS_NESTED_DESKTOP_HEIGHT:-800}; sleep 1; waydroid show-full-ui &> /dev/null &"
fi

# Launch Waydroid
sleep 2 &&
export XDG_SESSION_TYPE='wayland'
export WAYLAND_DISPLAY='weston-waydroid'
LAUNCH_PARAM=$@
/usr/bin/waydroid ${LAUNCH_PARAM:-first-launch} &

# Fix controllers, we know Waydroid has started because surfaceflinger is running
while [ "" == "$(pgrep surfaceflinger)" ]; do
sleep 1
Expand Down

0 comments on commit 463f206

Please sign in to comment.