Skip to content

fix(screenshot): resolve target monitor before opening from the control-panel button - #22

Open
perlowja wants to merge 1 commit into
singularityos-lab:mainfrom
perlowja:fix/screenshot-monitor-not-resolved
Open

fix(screenshot): resolve target monitor before opening from the control-panel button#22
perlowja wants to merge 1 commit into
singularityos-lab:mainfrom
perlowja:fix/screenshot-monitor-not-resolved

Conversation

@perlowja

Copy link
Copy Markdown
Contributor

The control-panel camera button called tool.present() directly, skipping prepare_for_invocation() -- so _target_monitor/_target_connector stayed null and screen-mode capture always failed with "no target monitor for screen capture", surfaced as the generic "Screenshots unavailable" dialog. shortcut_manager.vala's Print-key path already calls prepare_for_invocation() correctly; this entry point never did.

Also adds real logging to ScreenshotPortal.is_available()'s previously-silent failure paths -- this is what let me rule out the portal/D-Bus layer and find the actual bug.

Validated: rebuilt, deployed, restarted on real O6N hardware -- control-panel screenshot button now captures successfully.

…ol-panel button

system_view.vala's snap_btn.clicked handler called tool.present()
directly, never calling prepare_for_invocation() first -- so
_target_monitor and _target_connector stayed null (their declared
defaults) for this entry point. The toolbar defaults to screen mode
on open, and target_monitor_capture_args() returns null when neither
is set, so every capture from THIS button failed immediately with
'no target monitor for screen capture', shown to the user as the
generic 'Screenshots unavailable' dialog -- misleading, since the
portal/backend were both healthy.

shortcut_manager.vala's screenshot_tool_action() (the Print-key path)
already calls prepare_for_invocation() before opening; this entry
point never did. Match that pattern: resolve the focused-window
handle, call prepare_for_invocation(), and use open_dialog() (matching
the working path) instead of present().

Also adds real logging to ScreenshotPortal.is_available()'s previously
silent failure paths -- useful on its own, and what let me rule out
the portal/D-Bus layer here in the first place: it caught nothing on
this bug precisely because nothing was wrong at that layer.

Confirmed fixed on real O6N hardware: rebuilt, deployed, restarted,
control-panel screenshot button now captures successfully.
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