Commit Graph

3 Commits (e492f9e2980a2f07bfa9df8778276fbde29ab85c)

Author SHA1 Message Date
David Edmundson 24c9194f4c Scaling support in ColorPicker effect
Summary:
glReadPixels needs the correct location relative to the
framebuffer so we need to factor in the scale as well as translation
when going from compositor space.

Test Plan:
Ran the plasma colour picker plasmoid in windowed mode
Clicked on multiple parts of a window
It was right every time

Reviewers: #plasma

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D4950
2017-04-28 10:23:13 +01:00
Martin Gräßlin ab45659677 Add support for on-screen-message to kwineffects
Summary:
This adds support for the new on-screen-message support to the
kwineffects API and makes use of it in the colorpicker effect.

Not yet added to screenshot effect as for that we need support for
skip close animation on the on-screen-message window.

Reviewers: #plasma, #kwin

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3803
2016-12-24 09:56:48 +01:00
Martin Gräßlin 2cc55e4077 [effects] Add a colorpicker effect
Summary:
The effect exports itself to DBus as object "/ColorPicker" and provides
an own interface "org.kde.kwin.ColorPicker".

It has one exported method to DBus "pick" which returns a QColor. When
invoked an interactive position picking selection is started. If it ends
the effect reads the color value at the picked position from the OpenGL
color buffer.

This implements T4568.

Reviewers: #kwin, #plasma_on_wayland, broulik

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3480
2016-11-25 09:30:34 +01:00