Skip to content

Screenshot and screen recorder shell support - #3

Open
wayne-tbl wants to merge 5 commits into
FuriLabs:forkyfrom
wayne-tbl:screen-capture
Open

Screenshot and screen recorder shell support#3
wayne-tbl wants to merge 5 commits into
FuriLabs:forkyfrom
wayne-tbl:screen-capture

Conversation

@wayne-tbl

@wayne-tbl wayne-tbl commented Aug 16, 2026

Copy link
Copy Markdown

The shell side of the two capture quick settings. Updated again at review request (18 Aug): the exported symbols are gone — the plugin now reaches the shell over D-Bus instead. The quick settings themselves live in FuriLabs/furios-phosh-plugins#2.

src/phosh-exported-symbols.txt.in is byte-identical to forky again, so nothing here can be caught out by an upstream ABI change.

  • shell: add a helper to fold the top panel — the shell already folds the drawer on lock, from inside phosh_shell_set_locked(); this lifts it into a function so the screenshot manager can do the same. Not exported; called from within the shell only.
  • screenshot-manager: open the shot from its notification — click to open in the default image viewer, with a thumbnail of what was captured.
  • screenshot-manager: add a delayed screenshot — otherwise a shot taken from the quick settings is a picture of the quick settings. The countdown runs in a silent transient notification, closed 350 ms before the shutter: the banner is a layer surface like any other and a shot taken sooner catches it on its way out.
  • screenshot-manager: add a FuriOS interface for the delayed screenshotnew. io.furios.Shell.Screenshot.ScreenshotDelayed(u delay), which folds the drawer and starts the countdown, returning as soon as the countdown starts.
  • shell: add the screen capture gsettings — the screenshot delay, and the recorder's framerate, speed, codec, bitrate, audio source and touch drawing.

Why a new interface rather than a method on org.gnome.Shell.Screenshot

Same reasoning applied to the layer-shell protocol: that interface is defined upstream and is not ours to add methods to. This one is exported on the same bus name and the same object path (/org/gnome/Shell/Screenshot), so a caller needs no second lookup — just a different interface name on the same object. phosh already ships io.furios.Flashlightd.xml, so the namespace is not new here.

If you would rather it sat directly on org.gnome.Shell.Screenshot, it is a one-line move in the XML and the codegen entry.

Why the schema stays here

io.furios.phosh.shell is phosh's schema and a second package cannot extend it, so the keys cannot travel with the plugins. They are also read by the Settings panel (FuriLabs/gnome-control-center#5) whether or not the plugin package is installed.

Note on the power button

This adds a screenshot path; it does not replace one. src/power-menu-manager.c is untouched on every branch in this series and the power-button screenshot works exactly as before.

Pairs with FuriLabs/phoc#2: the Show Touches option writes phoc's touch-points key and is inert until that lands.
Needed by furios-phosh-plugins#2, which cannot build until this is merged and libphosh-0.45-dev rebuilt from it.

5 commits, off forky. Builds clean on an FLX1.

@wayne-tbl wayne-tbl changed the title Screenshot and screen recorder quick settings Screenshot and screen recorder shell support Aug 17, 2026
The shell already folds the settings drawer on lock, from inside
phosh_shell_set_locked(). Lift that into a function of its own so the
screenshot manager can do the same: a screenshot requested from the
drawer has to get the drawer out of the picture before it shoots.

Not exported. It is called from within the shell only.

Signed-off-by: wayne <wayne@furilabs.com>
Clicking the notification opens the file in the default image viewer, and
the notification carries a thumbnail of what was captured.

Signed-off-by: wayne <wayne@furilabs.com>
A screenshot taken from the quick settings would otherwise be a picture of
the quick settings. The delay is counted down in a silent, transient
notification, which is closed 350ms before the shutter -- the banner is a
layer surface like any other, and a shot taken any sooner catches it on
its way out.

Signed-off-by: wayne <wayne@furilabs.com>
The screenshot quick setting needs two things the shell alone can do:
fold the settings drawer away, and run the countdown somewhere that
outlives the drawer. Reaching those from a plugin by exporting
phosh_shell_fold_top_panel() and the manager's delayed screenshot would
put fork-only symbols in libphosh's export list, which upstream is free
to break at any ABI bump. D-Bus costs nothing here and does not.

The method goes on a new io.furios.Shell.Screenshot rather than onto
org.gnome.Shell.Screenshot: that interface is defined upstream and is not
ours to add methods to. It is exported on the same bus name and object
path, so a caller needs no second lookup to reach it.

Signed-off-by: wayne <wayne@furilabs.com>
The screenshot delay, and the recorder's framerate, speed, codec,
bitrate, audio source and touch drawing. The quick settings that write
them ship separately, in furios-phosh-plugins, but the schema belongs
here: io.furios.phosh.shell is phosh's, a second package cannot extend
it, and the Settings panel reads these keys whether or not the plugins
are installed.

Signed-off-by: wayne <wayne@furilabs.com>
@wayne-tbl

Copy link
Copy Markdown
Author

ScreenshotDelayed now exercised on hardware. Returns immediately, the shell-owned timer survives the caller and fires, valid 1080x2416 PNG written.

The first attempt failed against a blanked screen and exposed an upstream defect: maybe_screencopy_done() completes the D-Bus invocation with no NULL guard and returns without disposing self->frames, so any failed screenshot refuses every later one until phosh restarts. That code is byte-identical to forky, so it does not come from this branch. Fixed in #7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant