* fix(session): Home suspends a game another app launched, so Cocoon can resume it
A game launched from another front end (Cocoon, ES-DE, Daijisho...) or a
home-screen shortcut went into picture in picture on Home. Cocoon brings a
suspended player back by moving its task to the front, which Android ignores
for a task in picture in picture, and the floating game covered Cocoon's
Resume/Close bar. The game kept running instead of suspending, Cocoon's
Resume did nothing, and the only way back was the picture itself.
Automatic picture in picture now applies only to games DroidDeck launched
itself. For games launched by another app (the existing returnHome launch),
Home suspends the session, which is what Cocoon expects. The picture in
picture button still works for those games.
* fix(session): a new launch intent refreshes the automatic picture in picture rule at once
* feat(ui): one screen picker replaces the D button and the Second screen tab
The bottom screen's bar showed the panel's name as plain text, a D
button opened the menu, and the menu's Second screen tab picked the
panel. Now the panel's name is a dropdown right of the X. It lists
"DroidDeck menu" first, then the panels, with a check on the one in
use, so switching panels takes two taps instead of three.
The docked menu's header shows the same dropdown, labelled
"DroidDeck menu", in place of the highlighted D button. Opened there,
focus starts on the last panel, so one press of A goes back to it.
When the menu is on the top screen, the dropdown lists None and the
panels without the menu entry.
The Second screen tab is gone. Its "Show the game on" and display
choices are a Second screen group at the end of the Display tab. The
mode list's hint and its Mode heading are removed with their strings.
Previews of the docked menu (Controller and Display) and of a panel's
bar are added to the rendered preview cases.
* feat(ui): the swap button on the Keyboard + trackpad and Terminal panels
Every bottom-screen panel now has the swap button when the game can move
to the bottom screen; it was only on Deck grips, Profile controls,
Dashboard and Desktop. The swapped top-screen view already shows both
panels.
* fix(session): the bottom screen takes touch again while a game runs
Since #2763, a transparent KeepTopActivity covers every other display while a
session is on top. Its window is NOT_TOUCHABLE, but Android gives a
translucent activity alone in its task an ActivityRecordInputSink that eats
every touch on that display (ENABLE_TOUCH_OPAQUE_ACTIVITIES, on for this
target SDK). With the dual-screen panel closed, the bottom screen's launcher,
Cocoon or any other app could not be touched until the session ended, and
the guard stayed over it after Home/PiP as well.
- The guard now takes touches itself: a touch removes it from that display.
- It comes back when the session is top-resumed again, or after 5 s if the
session kept the top spot (the user touched the bottom screen once and
stayed in the game).
- Stopping or entering PiP removes the guards; PiP keeps the session at adj
50 with or without them, so they protected nothing there.
A/B on a Retroid Pocket Duo (Android 16, Cocoon as bottom home): the guard
is on top in every state it was on top on main, except the 5 s after a
bottom touch and PiP. Under lmkd pressure (kills down to adj 50, bottom
home killed 14-31 times per run) neither build lost the top spot.
* test(session): A/B tool for the keep-top guard on rooted dual screens, with Duo findings
* test(session): the guard A/B tool stops on a failed session start and cleans up an interrupted pressure run
* Log the GPU ceiling, steps and mid-session clock hold changes
The clock log now records the GPU frequency steps and floor once in
its header, probes each limit file as readable or refused, and adds
the allowed GPU maximum to every sample in the CPU cur/max(of top)
style, so a vendor or thermal cap on the GPU ceiling shows up and
changes during a session are visible. Samples are unchanged when no
limit file is readable.
The limit reading is shared with the device info GPU clock range.
Turning the GPU clock hold on or off during a session now logs the
same line the session start logs.
* Ignore a zero GPU ceiling and log hold changes in order
A ceiling file that reads zero is no longer printed as a limit and is listed
as refused, matching how the step list is read. The hold state line is logged
under the same lock as the state change, so overlapping toggles cannot log
out of order.
* Find a GPU ceiling that turns readable later and probe step tables as tables
A ceiling file that read zero at session start is looked for again on each
sample until one is found, and the log notes where it came from. Step and
floor sources are probed with the same parser that reads them, so a table
with a leading zero is listed as readable.
* fix(session): show the recorded reason when a session fails to start
The ended screen now shows any recorded start-up failure message except a plain guest exit, not only PROOT_MISSING. The graphics runtime staging and game environment publish failures now record GRAPHICS_RUNTIME_FAILED and GAME_ENVIRONMENT_FAILED with their own messages instead of looking like a guest exit.
* i18n(session): translate the start failure messages
---------
Co-authored-by: Tapuuk <177422350+Tapuuk@users.noreply.github.com>
Co-authored-by: maxjivi05 <maxjividen@gmail.com>
* fix(input): keep held keyboard keys when pointer capture ends
When a game gives up its pointer lock, Android pointer capture is
released and the session dropped every held input, including keyboard
keys. In a windowed session with Relative mouse on Auto, holding W to
run and releasing the mouse button after steering stopped the
character, because the key press is never sent again.
Losing pointer capture now releases only the mouse buttons, the pen and
the mouse back-button input. Keys are still released when the window
loses focus.
* fix(input): release held keys when pointer capture ends for the session menu
Opening the session menu releases pointer capture, and the menu then
consumes key events, including the key-up. A key held at that moment
would stay pressed in the guest after the menu closed. Capture loss with
the menu open now releases keys as before; other capture loss keeps them.
* fix(input): release held keys whenever another surface takes the keyboard
Capture loss released keys only while the session menu was open. The
other places that take input from the guest (on-screen keyboard,
achievements, input settings, WoW chat, touch editor, picture in picture)
have the same problem, so keys are now kept only when the session still
owns input and the game itself dropped its pointer lock.
* fix(input): release held keys when the session menu opens
While the menu is open it takes every key event, including the key-up,
so a key held when it opened stayed pressed in the guest. The keys are
now released when the menu opens, whether or not pointer capture was
active.
---------
Co-authored-by: zdennisz <15849186+zdennisz@users.noreply.github.com>
* chore: consistent code branding
* fix: carry legacy overrides, queues and live sync rows across the rename
* fix: keep queued legacy overrides on a failed rename and separate merged queue entries
* fix(dual-screen): allow game swap to external second screens
* fix(dual-screen): name external screens primary and secondary in the game screen choice
* Keep the selected game screen in step with display changes and session mode
* Refresh the game output when the screen is picked automatically
* Keep the game screen when controls open automatically
* Keep the external game screen across restarts and show the controls on the primary screen
* fix(dual-screen): preserve selected game display
* fix(dual-screen): retain fallback selection and keyboard access
* fix(input): clear field keyboard ownership on transitions
* fix(dual-screen): route keyboard when selected display is occupied
* fix(dual-screen): enable keyboard fallback routing
* fix(dual-screen): defer keyboard requests until focus returns
* fix(dual-screen): recheck keyboard destination on focus return and ignore stale hide events
* fix(dual-screen): end guest keyboard ownership on real dismissals
* fix(input): screen taps move the pointer without clicking while an on-screen mouse button is shown
* fix(input): keep tap-to-click with the stock Desktop on-screen gamepad
Only mouse buttons the user bound, not the profile base's stock bindings, make screen taps pointer-only.
* fix(input): count mouse buttons on the second-screen and foldable panels
* fix(input): keep tap clicks off on the swapped panel, copied stock panels and the scroll layer
* fix(input): move the pointer before the desktop gesture buffer when an on-screen mouse button clicks
* fix(input): the on-screen button gate leaves uninitialized gestures alone
---------
Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
* Add integer scaling mode
* Fix integer scaling view-space input bounds
* Improve integer scaling tolerance
* Add Fit and Auto scaling toggle to session drawer
* Translate Fit and Integer scaling labels
* Clarify integer scaling cropping hint
* Update integer scaling hint across translations
* Fix integer scaling settings and translations
* Fix controller input for integer scaling
* Complete integer scaling hint translations
* Fix integer scaling hint translations
* Restore XML declaration quote style
* Use double quotes in XML declarations
* Add missing norugeuingz translatisn
* fix: include math.h for roundf integer scaling
* fix: link math library in Vulkan caller tests
* Fix integer scaling translations
* Fix Italian integer scaling string
* Fix Italian scaling hint apostrophe
* fix(proot): ship proot in the APK and run it from the native library directory
* fix(native): start rootfs programs through an APK-shipped exec loader where data files may not be executed
* fix(audio): start PulseAudio through the system linker where data files may not be executed
* feat: target Android 14 (SDK 34) so Play Protect installs DroidDeck without a warning
* fix: ask for all-files access on Android 11+, reject unloadable ELFs before exec, keep checking the proot pack
* fix: hand host scripts to the kernel, skip startup launch while all-files Settings is open
* fix: run proot from its add-on pack through Android's linker, so the APK carries no proot
* fix: declare high sampling rate sensors for controller gyro at target 34
* fix: offer the rootfs proot fallback only where Android lets proot exec its loader
* test: install the runtime's proot pack in GameFileSync fixtures
* feat(display): black frame insertion on 100 Hz and faster screens
* feat(display): black frame insertion lives in Screen effects
* test(compositor): cover black frame insertion in the render-on-commit harness
* fix(display): keep HDR and pacing intact around black frame insertion
* fix(display): gate black frame insertion on the panel's refresh, not the tick rate
BFI checked the 100 Hz minimum against g_refresh_ns, an average of the time
between handled vsync ticks. BFI presents on every tick, so under load the
ticks run late, the average fell to 95-100 Hz on a 120 Hz panel, and BFI
switched off and on again many times a second (3793 times in one session on
a Retroid Pocket Duo). That showed as uneven flicker.
Use the display mode's refresh (g_output_refresh_mhz) instead, which only
changes when the mode does.
* fix(display): offer black frame insertion for the bottom screen and while it is on
* fix(display): capture a picture, not a black refresh, while black frame insertion strobes
* fix(display): hold black frame insertion off until the last capture ends
* fix(display): keep the game composed while a capture holds black frame insertion
* test(display): a picture hold presents only pictures while black frame insertion runs
* fix(rockstar): ship the launcher service as an add-on pack, not inside the APK
* fix: ship the DiRT ws2_32 stand-in as an add-on pack and reject Windows executables in the APK
* fix(release): reject APK entries under a packed path even when the manifest omits them
* fix(dirt): fetch the ws2_32 stand-in pack once the Linux runtime is installed
* fix(input): read a USB mouse directly where Android won't capture it, as in REDMAGIC cast mode
REDMAGIC's cast mode shows the session on a virtual display while its own
mirror activity keeps focus on the phone's display. Android only grants
pointer capture on the focused display, so the session got a cursor that
stopped at the screen edge and the camera stopped turning in mouse-look games.
When capture is wanted but not granted within 500 ms, the session claims the
mouse's USB HID boot interface instead, reads its reports with the layout from
its report descriptor (boot protocol if that can't be read), and sends motion,
five buttons and the wheel the way captured motion goes. The mouse goes back
to Android whenever capture is no longer wanted.
* feat(input): hold the middle button still to open the session menu while the mouse is read over USB
While the session reads the mouse over USB, Android has no cursor, so the
mouse can't reach REDMAGIC's cast-mode panel or anything else outside the
session. Holding the middle button for two seconds without moving opens the
session menu, which hands the mouse back to Android until the menu closes.
Quick middle clicks and middle-button drags still reach the game.
Relative motion sent to a locked pointer now hides the session's own cursor,
as pad pointer motion already does. A desktop keeps its grab while the menu
is open, so a click made with Android's cursor on the way back showed the
session cursor, which then stayed where the click was.
* fix(input): give a USB mouse back to Android when the app starts after being killed while reading it
A process killed while it reads the mouse, by a crash or an update, leaves
the mouse's interface with no driver, so Android has no mouse until it is
replugged. At startup, any permitted USB boot mouse that can be claimed
without force has no driver, and releasing it reattaches Android's.
* fix(input): only sessions shown off the phone's screen fall back to reading the USB mouse
Android grants pointer capture on the focused display, which the phone's own
screen is, so a session there never needs the USB mouse. Checking the display
keeps a slow capture grant from ever asking for the mouse's USB access there.
* fix(input): reject out-of-range HID report sizes and counts, and release USB buttons when the mouse is lost
A report descriptor can give any 32-bit report count or size, which drove the
field loop for billions of iterations and could overflow bit offsets into a
negative index on the reader thread. Items outside 32 bits and 4096 fields are
rejected, so such a mouse falls back to the boot protocol.
A mouse that stops responding while it is read over USB now releases the
buttons it held and cancels a pending menu hold, through a separate onLost
callback, since the session's own release path only runs while the grab is
still active.
* test(input): an oversized report count is rejected even when X and Y follow it
The earlier case had no X or Y fields, so it returned null without the count
check too. A 4097-field item before valid X and Y is now rejected, and a
4096-field one still parses.
* fix(input): Auto relative mouse sees a mouse read over USB, and re-checks when it is lost
The Auto relative-mouse decision from #2305 reads mouseAttached() on the
relative-mouse thread, which counts a mouse read over USB, so the grab's
state is now volatile. Losing that mouse re-runs the decision, as removing
an Android mouse does.
* fix(input): set up the USB mouse on its reader thread, select report protocol, and retry a failed permission request
Opening the receiver and its descriptor and protocol transfers now run on the
reader thread, so an unresponsive receiver can't stall the session for up to
two seconds. A release during setup lets the thread clean up as it already
did. A mouse that fails setup isn't tried again until it is replugged, since
releasing it re-adds Android's mouse, which would start another attempt.
A parsed report descriptor now selects report protocol first: HID 1.11
7.2.6 says a host must not assume the protocol a device is in.
A permission request that throws no longer marks the mouse as asked.
* fix(input): a cancelled or overlapping USB reader can't claim the mouse or mark it failed
A new reader waits for the previous one to let go of the interface, so a
quick release and grab, like toggling the session menu, no longer fails the
claim. A reader released before or during setup doesn't claim the interface
or keeps going. Failing to open or claim leaves the mouse with Android without
marking it failed, since nothing re-adds it to start another attempt; only a
failure after claiming, or a lost mouse, marks it, and only for the current
reader.
If SET_PROTOCOL(report) fails, setup tries boot protocol before giving up,
so the decoder always matches the protocol the mouse was set to.
* fix(input): release can't slip between the USB reader's cancellation check and its claim
The reader checked `running` and then claimed the interface, so a release in
between still let it claim and start setup. The check and claim now share a
lock with release, so the reader either never claims or claims first and sees
the release before setup.
* fix(input): hand the mouse back to Android while the WoW chat bar is on top
appUiOwnsPointer() already shows Android's pointer for the on-top chat bar,
but pointer capture, and now the USB mouse, stayed on, so that pointer
couldn't reach the bar. The bar on top now ends capture and USB reading like
the session menus do, and its changes re-run the capture decision.
* feat(compositor): pen samples drive the pointer like a mouse
Input record 13 carries the pen's state (in proximity, tip, right and
middle button) and its position in input space as 24.8 fixed point.
Hover moves the pointer, the tip holds the left button, and a record
without the in-proximity bit releases every button. Under a pointer
lock only the buttons pass. A button pressed or released mid-stroke
keeps the implicit grab on the window the stroke started in, unless
that window closed.
* feat(input): a pen moves the pointer while hovering, clicks with its tip and right-clicks with its side button
In Mouse mode (the default) a pen's hover moves the pointer, the tip
holds the left button and the side button right-clicks; Touch keeps it a
finger. The side button can send a middle click or nothing instead, and
a Bluetooth pen key counts as the side button while the pen is near.
With glasses or a program's pointer lock the pen drives the touchpad.
A hover exit followed within 50 ms by more hover or a touch keeps the
pen near, so a pen at the edge of its hover range does not flicker out,
and a hover that sends nothing for 2 s leaves proximity. On the desktop
a pen that comes near releases KWin's grab of a hardware mouse, so the
pen moves KWin's pointer. Whatever cancels touches also ends the pen,
and stylus devices no longer count as hardware mice.
* feat(input): pen mode and side button settings in the Controls tab and the session drawer
A Pen group follows the touch settings once the phone has a stylus
device or a pen event was seen, which is remembered as penSeen and kept
by a settings reset. It holds Pen (Mouse, Touch) and Side button (Right
click, Middle click, Off); Side button is hidden in Touch. Before
Android 14 a touchscreen reports the stylus source without a pen, so
there it counts only with its first pen event. The strings are
translated into all 32 languages.
* docs: describe pen input and its limits
---------
Co-authored-by: alien2003 <11610652+alien2003@users.noreply.github.com>
nativeSendSceneInput took bare integers (3, 4, 6, 11, 12) and the
wheel step (120) and pointer fixed-point scale (256) were repeated
inline. BottomDesktopPanel kept its own private copies of three of
them. Move them to WaylandCompositor next to the native method and
use them at every call site. No behavior change.
Co-authored-by: Dennis Zabolotny <15849186+zdennisz@users.noreply.github.com>
The 8BitDo Ultimate Mobile registers a mouse interface next to its gamepad.
On REDMAGIC the back gesture has no virtual-hard-key flag, so with that
mouse attached it was sent to the game as a right-click. A mouse that
shares its USB id with an attached controller no longer counts.
* fix(agent): one-state composer with model and usage on top; reading back stays detached while the agent streams
- The composer no longer has a compact reading bar that a first tap expands: the editor is
always the editor, and the model picker and context ring move to the top beside the menu.
- The pet chat drops its DeeDee title so that top bar gets the whole width.
- Scrolling back stops following new output; new entries and streamed text only scroll the
list while it is at the bottom, and sending a message resumes following.
- When the editor slides back in or the keyboard rises, a list at the bottom keeps its last
lines above the editor, even mid-drag.
* fix(agent): a revise while reading back shows the editor it focuses
* feat(agent): dictate a message, and attach what the running game shows
- With nothing typed, the editor's send button dictates instead, through Android's speech
recognizer; what is heard follows the text already there. It asks for the microphone the
first time.
- While a game session is open, a camera button attaches the game's current frame. It is
copied from the game's own surface, as the bottom screen's screenshots are, so the chat or
drawer over it is not in the picture.
* feat(agent): a notification when a turn ends unseen, and replies that end in choices offer them as buttons
- A turn that ends while neither the Agent page nor the pet is in view posts a notification:
finished, failed or asking, with the reply's first line. Opening the Agent page clears it.
- Claude Code's question tool is not available in print mode, so the brief asks the agent to
end a reply with a choices block instead. The chat shows its options as buttons, and the one
picked is sent as the next message.
* feat(agent): a subagent's work shows under the call that started it
Claude Code tags a subagent's messages with the call that started it. Its text, thinking and
streamed deltas used to show as the main agent's reply, and its tool calls mixed into the
turn. Now only its tool calls are kept, stored with their parent, and shown inside the
parent's card: a live line with the step count and the latest call, and every call when
the card is opened. Its token counts no longer overwrite the context reading.
* feat(agent): copy a reply or a tool's text, and open a turn's changes in one place
- A turn's footer has a copy button for everything the agent said in it, and tool input and
output boxes have one each.
- The files-changed chip opens every edit the turn made, file by file.
* feat(agent): search conversations in History
A field above the list keeps the conversations whose title, messages or replies hold the
text, ignoring case. Chat files are read off the main thread, a quarter second after the
last keystroke.
* fix(agent): sending while reading back jumps to the latest
* feat(agent): manage Claude Code's MCP servers and skills from the Agent menu
A new panel lists the MCP servers claude mcp list reports, adds one for every project from a
URL (over HTTP) or a start command (over stdio), and removes it; connectors from the
claude.ai account are listed but managed there. It also lists the skills in
~/.claude/skills with their descriptions, and deletes one after a confirming second tap.
* fix(agent): review follow-ups for the Agent tab refinements
- Choices only come from one fenced block that ends the reply.
- The Agent page counts as on screen only while its activity is started, so a turn ending
during a game still notifies.
- Picking a choice or Go jumps to the latest like sending does.
- Dictation stops when the chat is hidden or the keyboard sends; stopping it by hand keeps
the recognizer until its final result.
- A failed JPEG encode is not attached.
- The copied reply is read from the turn each time.
- MCP start commands keep their quoted arguments; the CLI is read beside its 90 s deadline;
deleting a skill runs off the main thread and removes links without following them.
* fix(agent): scroll the shrinking list after layout, not during measure
* fix(agent): fence-aware choices parsing; dictation stops overwriting edited drafts
* fix(agent): ignore choices blocks nested in a code fence
* fix(agent): treat tilde fences like backtick fences when finding choices
* test(agent): cover a tilde-fenced choices block
* fix(runtime): record why a runtime install failed in the session events
* fix(runtime): report empty or invalid runtime catalogs in the failure event
* fix(runtime): keep each install failure reason on its own job
* fix(runtime): name the busy reason for rejected installs and drop the owner's listener
* fix(runtime): keep each install call's failure reason on its calling thread
* fix(runtime): keep the interrupted reason when a joined install finishes during the wait
* feat: every HUD reading has its own switch and a row order
* feat: readings get a reorder dialog of their own
* refactor: drag alone moves a reading
* fix: the readings list is one column with a switch per row
* fix: one scrolling readings list, titled HUD info
* refactor: derive the readings order from the defaults instead of a second list
* fix: the readings dialog loses its doubled title and follows the saved order
* refactor: no title in the readings dialog, its actions sit beside the list
* refactor: readings dialog actions take the free side on landscape, the foot on portrait
* fix: the readings list follows the size it draws and drags with a live gap
* fix: the readings dialog fills the window and keeps scrolling under a held drag
* fix: reset restores every size's order, and the new HUD strings are translated
* refactor: one table for each size's rows and one for its text sizes
* refactor: the readings list swaps rows as the drag passes them, and the list animates the rest
* refactor: give the readings rows test tags for the local UI test
* refactor: HUD readings follow one configurable row table
* refactor: the Strip HUD draws its rows from the same table
* refactor: each size orders its rows by its own table, and the frame graph is a row
* fix: the readings dialog keeps the row order a drag leaves
* fix: each size keeps its own row order, and reset clears only the order
* refactor: the graph's size lives in one place, and the section markers are gone
* fix: a size change and the first save of a legacy config both keep the order
* chore: retrigger the build
* feat: a reading can be grabbed with Y and shuffled with the d-pad
* feat: controller hints float beside the dialog, and a moved row stays in view
* feat: Y grabs on a hold and drops on release, and a touch no longer flips the dialog
* fix: keep the key hints off the rows on narrow windows, and let Enter toggle a row
* feat(agent): DeeDee, a pet that floats over any app and opens the agent's chat
* feat(agent): DeeDee docks and opens its chat like a chat head; throws pick their side by velocity, for the pet and the HUD
* fix(hud): the strip tucks into its fps tab with a shorter pull, and a throw toward an edge counts
* fix(hud): the HUD shows in desktop sessions again
* feat(agent): DeeDee rests tucked past the screen edge like a chat head
* fix(agent): DeeDee opens its own chat in every window, themed, and a fling across no longer tucks the HUD away
* fix(agent): the chat grows from wherever DeeDee is as it hops to its corner
* fix(agent): DeeDee hides with the PC keyboard, falls back if it cannot float, can be opened by accessibility, and settles when a drag is cancelled
* fix(agent): B and Back close DeeDee's in-window chat before the window acts on them
* fix(agent): Back closes only the chat open in that window
* fix(input): injected Back is a right-click only while an external mouse is attached
* input: order imports
* fix(input): reject built-in devices for injected Back
* fix(input): log matched mouse for injected Back
* fix(input): ignore mice that name themselves virtual for injected Back
* fix(input): Auto relative mouse stays off for direct touch without a mouse
* fix(input): re-check relative mouse when an input device changes
* fix(input): reapply relative mouse after agent readiness
* fix(input): only the current session clears the agent-ready hook and readiness resets relative mouse retries
* fix(dual-screen): drop the Dashboard notifications page and its notification listener
* test(session): freeze the clock in the memory-pressure policy harness
* fix(input): taps outside the PC keyboard reach the game while it is open
* fix(input): the game's cursor stays visible while only the PC keyboard is open
* fix(input): a touch cancelled mid-stream stays closed until the finger lifts
* A resize also ends a pending two-finger touch
* A new touch clears a dismissal left by a stream that ended elsewhere
* A new touch is not held back by a three-finger tap whose end was consumed
* fix(library): added and Battle.net games sort by when they were played and installed
Recently played and Recently installed put every added game, Battle.net
games included, at the bottom: nothing recorded a launch or an install time
for them, and the Steam play-time lookup was never reached once an entry had
a game. Launching an added game now records its play time, added games carry
their folder's install time (kept in the library cache), Battle.net installs
report theirs, and a zero time falls through to the next source.
* fix(library): an added game's play time is recorded only after it launches and kept when it is rebuilt
* fix(library): an added game's play time is recorded only when its launch is accepted
* fix(library): an added game's play time is recorded when its session actually starts
* fix(library): an added game's play time is recorded when its session service starts
* gamescope: a confine is relative only while it holds the X pointer
Patch 0128 made every hidden-cursor confine relative. Games that hide the
system cursor, draw their own and confine the pointer to their window then
took the host lock, and a direct touch drag became camera motion with no
button held, so cards and items could not be dragged.
A confine now goes relative once the X pointer stays away from the seat
position while input moves, as when a game recentres it or clips it to a
small rectangle, and returns to absolute when the pointer follows again or
the confine ends. Locks and the warp follow rule are unchanged.
* gamescope: a constraint without a hint is relative only while the game holds the X pointer
Xwayland turns a hidden-cursor grab into a lock with no cursor position hint, so the confine-only rule never applied to games that draw their own cursor (Stardew Valley, Balatro). A hinted constraint is relative at once, as upstream. An unhinted lock or confine goes relative once the X pointer stops following the seat's motion, which a recentring or clipping game does and a drawn-cursor game does not.
* gamescope: a pointer constraint is relative only while the game holds the X pointer
Stardew Valley's grab with a hidden cursor becomes an Xwayland lock with a cursor position hint, which upstream made relative at once. Without relative mode that lock still follows gamescope's relative motion and touches still place the pointer, so the hold rule now decides for every constraint, hinted or not.
* gamescope: a hinted lock starts relative and is released once the X pointer follows
Releasing a hinted lock only through the hold rule let a recentring game's first touch swipe press the button. A hinted lock now starts relative as upstream and is released after 30 moving frames on which the X pointer follows the motion gamescope sends, counted from the relative motion while the seat is locked.
* gamescope: count away frames within one half-second window
* gamescope: a hint that arrives with the game's first warp starts the lock relative
* fix(input): end the touch press when a program locks the pointer mid-swipe
A game that only shows its pointer lock after its first warp took the first
swipe as an absolute drag, with the button held until the finger lifted.
The first locked move now ends the forwarded touch before sending deltas.
* gamescope: a new focus window or constraint starts its own pointer hold
A held state from one constrained window carried over to the next one
when focus moved before a reset frame. Track the input focus window and
the constraint, and restart the hold when either changes.
* gamescope: read the pointer constraint under the wlserver lock
GetCursorConstraint asserts the lock is held, so the hold tracker
aborted as soon as a program constrained the pointer.
* fix(input): a mid-swipe pointer lock ends the touch but keeps a held button
The first locked move cancelled the whole direct-touch hold, releasing a
right button held by a long press. It now cancels only the forwarded touch;
the held button is released when the finger lifts, as before.
* fix(input): extra fingers during a locked swipe stay out of the cancelled touch
Once a locked swipe has ended the forwarded touch, a second finger restarted
it with a new touch-down while the swipe carried on as relative motion. Extra
fingers are now ignored until the swipe ends; the final lift still releases a
held button.
* fix(input): a swipe that ended its touch stays closed until the finger lifts