[Color Picker] Fix picking colors in multi-screen
ClosedPublic

Authored by broulik on Jul 12 2017, 8:25 AM.

Details

Summary

Simplifies code and also grab just one pixel instead of the entire screen.

BUG: 382261
FIXED-IN: 5.10.4

Test Plan

Picks correct color on both screens and also seems to pick fine with device pixel ratio (plasmashell doesn't use it but plasmoidviewer does)

Code from QColorDialog

Diff Detail

Repository
R114 Plasma Addons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jul 12 2017, 8:25 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 12 2017, 8:25 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Jul 12 2017, 9:41 AM
davidedmundson added a subscriber: davidedmundson.

Can you validate the pixmap is not null before we access the pixel data, just in case grabwindow fails.

This revision is now accepted and ready to land.Jul 12 2017, 9:41 AM
This revision was automatically updated to reflect the committed changes.