Skip to content

fix: keep Treeland screenshot toolbar on screen#877

Draft
svan71 wants to merge 1 commit into
linuxdeepin:masterfrom
svan71:agent/treeland-toolbar-screen-bounds
Draft

fix: keep Treeland screenshot toolbar on screen#877
svan71 wants to merge 1 commit into
linuxdeepin:masterfrom
svan71:agent/treeland-toolbar-screen-bounds

Conversation

@svan71

@svan71 svan71 commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • choose the monitor that owns the Treeland capture region
  • place the screenshot toolbar below or above the selection when space permits
  • clamp new and restored toolbar positions to the selected monitor bounds
  • add focused geometry coverage for screen edges and multi-monitor layouts

Why

The Treeland screenshot toolbar used a position derived from the capture region and the main overlay size without checking the actual monitor bounds. Near the top or right edge, controls could overlap the selected image or extend off-screen.

Testing

  • focused geometry test executable: 10/10 tests passed
  • git diff --check passed
  • qmake full-tree compile reached an existing current-master error in main_window.cpp: QPainterPath is incomplete because its header is not included; the new placement helper and its direct consumers compiled before that unrelated failure

This change contains no distribution theme or user-specific customization.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: svan71

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @svan71, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

Hi @svan71. Thanks for your PR. 😃

@deepin-ci-robot

Copy link
Copy Markdown

Hi @svan71. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

The Treeland screenshot toolbar positioned from the capture region and
main overlay size without checking the actual monitor bounds. Near the
top or right edge, controls could overlap the selected image or extend
off-screen.

Choose the monitor that owns the capture region, place the toolbar
below or above the selection when space permits, and clamp new and
restored toolbar positions to that monitor's bounds.
@svan71
svan71 force-pushed the agent/treeland-toolbar-screen-bounds branch from 0d8c0b0 to 74f4e55 Compare July 23, 2026 21:14
@svan71

svan71 commented Jul 24, 2026

Copy link
Copy Markdown
Author

The red ✗ on cppcheck here is CI infrastructure, not this PR: actions/checkout recently began refusing fork-PR checkout in pull_request_target workflows, so cppcheck never actually runs (job dies at checkout in ~5s). Filed with details and suggested fixes: linuxdeepin/developer-center#13729 This branch actually passed cppcheck on 2026-07-17, before the checkout regression.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants