Repository navigation
Conversation
Contributor
GC.copyArea(Image, int, int) on a control applied the client-area rectangle to the scroll view of a bordered control unconverted, so the image was shifted by the bezel, and rendered only the control's own views, so transparent pixels came back empty. It now captures from the window content view with the rectangle converted from the control's view, like the on-screen pixels on GTK and Win32. Assisted-by: multiple AI agents and layers of automated tooling 🤖
vogella
force-pushed
the
cocoa-gc-copyarea-control-area
branch
from
November 12, 2026 21:33
49428e3 to
64c6a3d
Compare
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.
On Cocoa, GC.copyArea(Image, int, int) on a control applied the client-area rectangle unconverted to the scroll view of a bordered control, so the captured image was shifted by the bezel, and it rendered only the control's own views, so transparent pixels came back empty. The capture now comes from the window content view with the rectangle converted from the control's view, so pixel (0,0) is the client area's top-left and the parent background shows through, as on GTK and Win32. A re-entrancy guard in GC keeps a Paint listener that calls copyArea from recursing when the content view is a foreign view without SWT's own guard. Test_cocoa_GCCopyArea covers a bordered Composite at zero and non-zero offsets and a transparent Label over a colored shell.