Compare commits

...
5 changed files with 35 additions and 8 deletions

No files matched your search

@@ -275,6 +275,7 @@ public final class LinuxRuntime {
}
}
String[][] seeded = {
{"filesystems", ""},
{"file-max", "9223372036854775807\n"},
{"overcommit_memory", "0\n"},
};
@@ -287,6 +288,7 @@ public final class LinuxRuntime {
}
}
String[][] procFiles = {
{"filesystems", "/proc/filesystems"},
{"pci_devices", "/proc/bus/pci/devices"},
{"stat", "/proc/stat"},
{"version", "/proc/version"},
@@ -4,6 +4,8 @@ import android.content.ContextWrapper
import java.io.File
import java.nio.file.Files
import org.junit.After
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
@@ -35,4 +37,26 @@ class LinuxRuntimeProcFilesTest {
LinuxRuntime.binds(context, null, null, null, null)
assertEquals("1\n", File(fakeProc, "overcommit_memory").readText())
}
@Test fun restrictedFilesystemsHaveAConservativeFallback() {
val binds = LinuxRuntime.binds(context, null, null, null, null)
val fallback = File(fakeProc, "filesystems")
assertEquals("", fallback.readText())
assertEquals(!File("/proc/filesystems").canRead(), binds.contains("${fallback.path}:/proc/filesystems"))
assertTrue(binds.contains("/proc"))
assertFalse(binds.any { it.endsWith(":/proc/self/status") })
}
@Test fun explicitFilesystemsBindingWins() {
val source = File(root, "supported-fs").apply { writeText("nodev\ttmpfs\n") }
val explicit = "${source.path}:/proc/filesystems"
val binds = LinuxRuntime.binds(context, null, null, null, listOf(explicit))
assertEquals(listOf(explicit), binds.filter { it.endsWith(":/proc/filesystems") })
}
@Test fun existingFilesystemsDataIsPreserved() {
val fallback = File(fakeProc, "filesystems").apply { parentFile!!.mkdirs(); writeText("nodev\ttmpfs\n") }
LinuxRuntime.binds(context, null, null, null, null)
assertEquals("nodev\ttmpfs\n", fallback.readText())
}
}
+4 -3
View File
@@ -21,9 +21,10 @@ library list, before anything is published.
trip to Xwayland on the paint thread; with no image, wlserver's position is used as upstream does.
- `0101-nested-wayland-cursor-routing.patch` - this app: `gamescope_cursor_composite=2` lets the
nested Wayland session paint its cursor in the output using the real X pointer position; client
cursor surfaces are cleared to prevent a duplicate at the host pointer, while Gamescope's original
default host-cursor fallback is preserved when its no-keyboard-focus policy selects it. Empty
client cursor images and Gamescope's hidden flag still suppress the painted cursor.
cursor surfaces are cleared to prevent a duplicate at the host pointer, and so is Gamescope's
default host-cursor fallback, which would otherwise show a second arrow until Gamescope gets
keyboard focus. Empty client cursor images and Gamescope's hidden flag still suppress the
painted cursor.
- `0110-wayland-backend-touch.patch` - this app: the nested Wayland backend bound only the host's
pointer and keyboard, so a finger on the phone's screen never reached Steam. It now binds
`wl_touch` too and hands each finger to wlserver's touch path (`wlserver_touchdown` / `motion` /
@@ -74,7 +74,7 @@ index 0000000..d7c21da
+
+ constexpr bool CursorShouldBeForwardedToHost( int cursorCompositeMode, bool useHostCursorFallback )
+ {
+ return cursorCompositeMode != 2 || useHostCursorFallback;
+ return cursorCompositeMode != 2;
+ }
+
+ constexpr bool CursorImageShouldBePainted( bool imageEmpty, bool cursorHidden )
@@ -176,10 +176,10 @@ index 0000000..9c622db
+ REQUIRE( CursorShouldBeComposited( 2, false, false, true, false ) );
+}
+
+TEST_CASE("manual composition retains only the no-focus default cursor fallback", "[cursor_routing]")
+TEST_CASE("manual composition never forwards a cursor to the host", "[cursor_routing]")
+{
+ REQUIRE_FALSE( CursorShouldBeForwardedToHost( 2, false ) );
+ REQUIRE( CursorShouldBeForwardedToHost( 2, true ) );
+ REQUIRE_FALSE( CursorShouldBeForwardedToHost( 2, true ) );
+ REQUIRE( CursorShouldBeForwardedToHost( 1, false ) );
+ REQUIRE( CursorShouldBeForwardedToHost( 0, false ) );
+}
+2 -2
View File
@@ -1,3 +1,3 @@
GAMESCOPE_REPO=Droid-Deck/DroidDeck-Components
GAMESCOPE_TAG=gamescope-3.16.29-f3a45b31
GAMESCOPE_SHA256=3908af87b2ee8a328e9780fc805c6a7bddd11d7405b9992d717b94e16c019313
GAMESCOPE_TAG=gamescope-3.16.29-f7dd44d2
GAMESCOPE_SHA256=a034c36d44f9bca4abc804bda3958c8d303f1ce304fb677375e5d7aa233287a9