fix(screenshot): resolve target monitor before opening from the control-panel button - #22
Open
perlowja wants to merge 1 commit into
Open
Conversation
…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.
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.
The control-panel camera button called
tool.present()directly, skippingprepare_for_invocation()-- so_target_monitor/_target_connectorstayed 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 callsprepare_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.