Repository navigation
Conversation
…mmsb#24) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Once the panel is active, GetCanvas() hands back a canvas whose origin is PanelHeightFBOffset() rows into the framebuffer (75 rows at 828x1200), while still reporting the full screen height. Everything an app drew landed that far down and the last rows wrapped around to the top. Only apps that fall back to GetCanvas() are affected — the emulator, where GetTaskFramebuffer() is always NULL — and only once the panel has been set up, so drawing from the Init handler looked correct while drawing later from a worker thread (as inkview-slint apps do) did not. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
set_size resolves its argument against the window's current scale factor, so passing a logical size before announcing the scale made slint record that logical size as the physical one — a 828x1200 screen came out as a 331x480 window. Announce the scale first and pass physical pixels, which needs no conversion at all. Rendering is unchanged; it is what Window::size() reports that was wrong. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The SDK's host build of libinkview lets an app run on a desktop, which is not obvious from anything in this repo. Links the external tool that packages it, without taking on the tooling itself. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on top of simmsb#24 (simmsb/inkview-rs), whose
GetCanvas()fallback this branch needs — the basehere is
emulator-getcanvas-fallbackrather thanmaster, so this shows only the five commits itadds. It should land after simmsb#24 does.
What this adds
A desktop emulator. Some PocketBook SDK archives ship a host x86_64 build of
libinkview.soalongside the ARM one. Because
inkviewdlopens its library instead of linking it, building forx86_64-unknown-linux-gnuand putting that directory on the loader path runs the real app on adeveloper machine, in an X11 window:
screenshot-emuruns against a throwaway Xvfb, so it works headlessly and in CI — the firstrendering check this repo has had.
Two fixes the emulator exposed, both independent of the tooling and revertible on their own:
Screen::newnow takes the panel down on theGetCanvas()path. Once the panel is active thatcanvas starts
PanelHeightFBOffset()rows into the framebuffer (75 at 828x1200) while stillreporting the full height, so everything drawn landed that far down and the last rows wrapped to
the top. It only shows up when drawing happens after the
Inithandler — i.e. from the workerthread
inkview-slintapps use — which is why it went unnoticed.inkview-slintannounces the scale factor before setting the window size.set_sizeresolves itsargument against the window's current scale, so passing a logical size first made slint record it
as the physical one: an 828x1200 screen came out as a 331x480 window. Rendering was unaffected;
what
Window::size()reported was not.Notes for review
debian:stretch-slimcontainer (
utils/emulator/Dockerfile) and binaries target glibc 2.24.utils/emulator/README.mdcovers when to reach for the firmware-level emulator instead.
utils/emulator/peek-sdk-archive.pychecks another release by reading the 7z index over HTTP range requests, without downloading it.
run-emusets XQuartz up itself, including re-grantingxhoston every run — XQuartzquits with its last client and comes back with an empty access list.
takes touch input, and each commit here builds on its own.
🤖 Generated with Claude Code