Skip to content

A rootless Android app that boots Alpine Linux: run containers (Podman/Docker/LXC) and GUI desktop apps.

x11: pin framebuffer to top + ship X11 fonts

ExTv78a3ae38d719
diff --git a/app/src/main/java/com/excp/podroid/ui/screens/x11/X11Screen.kt b/app/src/main/java/com/excp/podroid/ui/screens/x11/X11Screen.kt
index ee7dd0c..945a2f5 100644
--- a/app/src/main/java/com/excp/podroid/ui/screens/x11/X11Screen.kt
+++ b/app/src/main/java/com/excp/podroid/ui/screens/x11/X11Screen.kt
@@ -93,9 +93,9 @@ fun X11Screen(
var svHeight by remember { mutableStateOf(1) }
// Letterbox / pillarbox destination rect inside the SurfaceView, recomputed
- // whenever the view size changes. Touch handler uses this to map screen
- // coords back into the framebuffer's 1280x720 space, so taps on the black
- // bars don't generate phantom mouse events.
+ // whenever the view size changes. Pinned to the TOP (dY = 0) so the soft
+ // keyboard never overlaps the framebuffer — the black bar lives below.
+ // Horizontally still centered (pillarbox) in landscape orientation.
val (dstX, dstY, dstW, dstH) = remember(svWidth, svHeight) {
val fbW = X11Constants.FB_WIDTH.toFloat()
val fbH = X11Constants.FB_HEIGHT.toFloat()
@@ -105,7 +105,7 @@ fun X11Screen(
val dW = (fbW * scale).toInt().coerceAtLeast(1)
val dH = (fbH * scale).toInt().coerceAtLeast(1)
val dX = ((viewW - dW) / 2f).toInt()
- val dY = ((viewH - dH) / 2f).toInt()
+ val dY = 0
IntArray4(dX, dY, dW, dH)
}
diff --git a/build-rootfs/build-rootfs.sh b/build-rootfs/build-rootfs.sh
index de2987e..598f682 100755
--- a/build-rootfs/build-rootfs.sh
+++ b/build-rootfs/build-rootfs.sh
@@ -42,7 +42,10 @@ apk -X "https://dl-cdn.alpinelinux.org/alpine/v${ALPINE_BRANCH}/main" \
gzip \
tigervnc \
pulseaudio \
- pulseaudio-utils
+ pulseaudio-utils \
+ font-misc-misc \
+ font-cursor-misc \
+ ttf-dejavu
# Apply file capabilities to newuidmap/newgidmap. apk's package install often
# does this, but we set them explicitly so the squashfs ships with the