1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-15 18:22:08 -04:00

colorpick/screenshot: make color-format aware

This commit is contained in:
bbedward
2025-12-05 17:26:38 -05:00
parent 22b2b69413
commit f9a6b4ce2c
8 changed files with 137 additions and 64 deletions

View File

@@ -160,14 +160,17 @@ func (r *RegionSelector) Run() (*CaptureResult, bool, error) {
}
yInverted := false
var format uint32
if r.selection.surface != nil {
yInverted = r.selection.surface.yInverted
format = r.selection.surface.screenFormat
}
return &CaptureResult{
Buffer: r.capturedBuffer,
Region: r.result, // Global coords for saving last region
Region: r.result,
YInverted: yInverted,
Format: format,
}, false, nil
}