Compare commits

...
Author SHA1 Message Date
maxjivi05 d0ac30c6a8 Merge main into feat/desktop-pacman 2026-10-30 15:26:05 -04:00
maxjivi05 83efbe3987 Set the scroll midpoint as soon as a finger lands or lifts so the next move still scrolls 2026-10-30 15:05:03 -04:00
maxjivi05 10618b0f60 Keep a scroll steady when a finger lands again, keep the clipboard echo for repeat callbacks, and never follow a linked pacman sync folder 2026-10-30 14:04:06 -04:00
maxjivi05 801e434345 Merge main into feat/desktop-pacman 2026-10-30 14:02:17 -04:00
maxjivi05 fc8dad5944 Install desktop-kde-r3 2026-10-27 15:17:15 -04:00
maxjivi05 cf86daa154 Scroll two-finger swipes at touchpad speed 2026-10-27 15:17:15 -04:00
maxjivi05 541e2230df Fix the KDE 6.8 desktop on device and make touch scrolling feel like a touchpad
- KWin presents one composited buffer (no overlay layers), so the wallpaper and icons show
- KWin runs without Gallium's threaded context, which crashed it on window uploads
- KWin forwards the host's scroll source, wheel steps and scroll stops (patch 0003)
- Two-finger scrolling sends touchpad scrolling at finger speed and moves the pointer under the fingers
- The first finger is held back briefly so a two-finger gesture never starts a touch in the app
- pacman takes over files other DroidDeck software already installed and won't remove those packages
2026-10-27 15:17:15 -04:00
maxjivi05 2f71916019 Two-finger hold right-clicks and two-finger slide scrolls on the desktop
A two-finger tap or a still two-finger hold right-clicks where the first
finger landed; two fingers sliding together scroll like a mouse wheel,
while a pinch still reaches the app as touch so zooming works.

pacman's backup records take md5 from the package files, since Arch
Linux ARM's .MTREE only carries sha256 now. removal-manifests.py gains
--add to append a new desktop version without regenerating the older
inventories, and covers the overlay's symlinks and pacman files.
2026-10-27 15:17:15 -04:00
maxjivi05 49201e1afa Make the desktop a proper Arch desktop: pacman, sudo, utilities and touch right-click
The KDE desktop package now records every package it ships in pacman's
database and carries a pinned droiddeck repository built from the same
Arch Linux ARM snapshot, so pacman installs software that matches the
desktop's Qt and KDE versions and never upgrades what DroidDeck ships.
sudo, su and sudoedit run commands as root through a small preload, and
pacman hooks refuse to remove or replace DroidDeck's own packages and
remember user installs so they come back after runtime updates.

Adds zip, 7zip, unrar, less, man pages, htop, git, wget, wl-clipboard,
xclip, KCalc, Okular, Filelight, KFind, System Monitor, Elisa and
Discover, pins Kate to the panel, and hides technical menu entries.
Updates KWin to 6.8.1 to match the repository.

A two-finger tap now right-clicks on the desktop, and the Android
clipboard is only pushed into the session when it changed, so files
copied in Dolphin stay pasteable after leaving the app.
2026-10-27 15:17:15 -04:00
5 changed files with 56 additions and 8 deletions

No files matched your search

@@ -57,10 +57,7 @@ class SessionClipboard(context: Context, private val hasFocus: () -> Boolean) {
val clip = clipboard.primaryClip
if (clip != null && clip.itemCount == 0) return
val text = clip?.getItemAt(0)?.text?.toString()
if (echo != null && text == echo) {
echo = null
return
}
if (echo != null && text == echo) return
echo = null
if (!changed && published && text == shared) return
publish(text)
@@ -83,7 +83,11 @@ class TwoFingerGestures(private val slopPx: Float, private val listener: Listene
pass(State.PASSING)
return true
}
State.SCROLLING, State.HELD, State.TAPPED -> return true
State.SCROLLING -> {
anchor(event, -1)
return true
}
State.HELD, State.TAPPED -> return true
else -> Unit
}
}
@@ -137,7 +141,11 @@ class TwoFingerGestures(private val slopPx: Float, private val listener: Listene
pass(State.PASSING)
return true
}
State.SCROLLING, State.HELD, State.TAPPED -> return true
State.SCROLLING -> {
anchor(event, event.actionIndex)
return true
}
State.HELD, State.TAPPED -> return true
else -> Unit
}
MotionEvent.ACTION_UP -> {
@@ -193,6 +201,13 @@ class TwoFingerGestures(private val slopPx: Float, private val listener: Listene
hypot(event.getX(i) - start.first, event.getY(i) - start.second) > slopPx
}
private fun anchor(event: MotionEvent, lifted: Int) {
val kept = (0 until event.pointerCount).filter { it != lifted }
if (kept.size < 2) return
lastX = (event.getX(kept[0]) + event.getX(kept[1])) / 2f
lastY = (event.getY(kept[0]) + event.getY(kept[1])) / 2f
}
private fun span(event: MotionEvent) = hypot(event.getX(1) - event.getX(0), event.getY(1) - event.getY(0))
private fun midX(event: MotionEvent) = (event.getX(0) + event.getX(1)) / 2f
private fun midY(event: MotionEvent) = (event.getY(0) + event.getY(1)) / 2f
@@ -97,8 +97,10 @@ internal object DesktopFileRemoval {
}
if (!dir.delete()) throw IOException("Cannot remove $dir")
}
for (name in listOf("sync/droiddeck.db", "droiddeck-desktop")) {
val file = File(lib, name)
val sync = File(lib, "sync")
val files = listOf(File(lib, "droiddeck-desktop")) +
listOfNotNull(File(sync, "droiddeck.db").takeUnless { Files.isSymbolicLink(sync.toPath()) })
for (file in files) {
if (Files.isSymbolicLink(file.toPath()) || file.isFile) Files.delete(file.toPath())
}
}
@@ -62,6 +62,32 @@ class TwoFingerGesturesTest {
assertEquals(listOf("cancel", "start 450.0,260.0", "scroll 0.0,60.0", "end"), calls)
}
@Test fun aFingerLandingAgainDuringAScrollDoesNotJump() {
touch(MotionEvent.ACTION_DOWN, 0, a)
time += 20
touch(MotionEvent.ACTION_POINTER_DOWN, 1, a, b)
time += 20
touch(MotionEvent.ACTION_MOVE, 0, 1 to (400f to 260f), 2 to (500f to 260f))
assertTrue(touch(MotionEvent.ACTION_POINTER_UP, 1, 1 to (400f to 260f), 2 to (500f to 260f)))
assertTrue(touch(MotionEvent.ACTION_MOVE, 0, 1 to (400f to 250f)))
assertTrue(touch(MotionEvent.ACTION_POINTER_DOWN, 1, 1 to (400f to 250f), 3 to (800f to 600f)))
assertTrue(touch(MotionEvent.ACTION_MOVE, 0, 1 to (400f to 230f), 3 to (800f to 580f)))
assertEquals(listOf("cancel", "start 450.0,260.0", "scroll 0.0,20.0"), calls)
}
@Test fun aThirdFingerLiftingDuringAScrollKeepsTheRemainingMidpoint() {
val c = 3 to (450f to 500f)
touch(MotionEvent.ACTION_DOWN, 0, a)
time += 20
touch(MotionEvent.ACTION_POINTER_DOWN, 1, a, b)
time += 20
touch(MotionEvent.ACTION_MOVE, 0, 1 to (400f to 260f), 2 to (500f to 260f))
assertTrue(touch(MotionEvent.ACTION_POINTER_DOWN, 2, 1 to (400f to 260f), 2 to (500f to 260f), c))
assertTrue(touch(MotionEvent.ACTION_POINTER_UP, 0, 1 to (400f to 260f), 2 to (500f to 260f), c))
assertTrue(touch(MotionEvent.ACTION_MOVE, 0, 2 to (500f to 250f), c))
assertEquals(listOf("cancel", "start 450.0,260.0", "scroll 0.0,5.0"), calls)
}
@Test fun pinchPassesThroughForZoom() {
touch(MotionEvent.ACTION_DOWN, 0, a)
time += 20
@@ -94,4 +94,12 @@ class DesktopFileRemovalTest {
assertFalse(File(root, "var/lib/pacman/sync/droiddeck.db").exists())
assertFalse(File(root, "var/lib/pacman/droiddeck-desktop").exists())
}
@Test fun aSymlinkedSyncDirectoryIsNotFollowed() {
val outside = File(dir, "outside/droiddeck.db").apply { parentFile.mkdirs(); writeText("keep") }
File(root, "var/lib/pacman/local").mkdirs()
Files.createSymbolicLink(File(root, "var/lib/pacman/sync").toPath(), outside.parentFile.toPath())
DesktopFileRemoval.removeRecords(root, emptySet())
assertEquals("keep", outside.readText())
}
}