Merge branch 'KDE/4.10'

This commit is contained in:
Martin Gräßlin 2013-01-11 08:52:42 +01:00
commit 47da2464f3
5 changed files with 45 additions and 17 deletions

View file

@ -8,3 +8,4 @@
#cmakedefine KWIN_BUILD_OXYGEN 1
#define KWIN_NAME "${KWIN_NAME}"
#define KWIN_CONFIG "${KWIN_NAME}rc"
#define KWIN_VERSION_STRING "${KDE4WORKSPACE_VERSION}"

View file

@ -96,6 +96,7 @@ void SlidingPopupsEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& da
w->enablePainting(EffectWindow::PAINT_DISABLED_BY_DELETE);
} else {
delete mDisappearingWindows.take(w);
w->addRepaintFull();
w->unrefWindow();
}
}
@ -103,10 +104,11 @@ void SlidingPopupsEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& da
const int start = mWindowsData[ w ].start;
if (start != 0) {
const QRect screenRect = effects->clientArea(FullScreenArea, w->screen(), effects->currentDesktop());
const QRect geo = w->expandedGeometry();
// filter out window quads, but only if the window does not start from the edge
switch(mWindowsData[ w ].from) {
case West: {
const double splitPoint = w->width() - (w->x() + w->width() - screenRect.x() - start) + w->width() * (appearing ? 1.0 - progress : progress);
const double splitPoint = geo.width() - (geo.x() + geo.width() - screenRect.x() - start) + geo.width() * (appearing ? 1.0 - progress : progress);
data.quads = data.quads.splitAtX(splitPoint);
WindowQuadList filtered;
foreach (const WindowQuad &quad, data.quads) {
@ -118,7 +120,7 @@ void SlidingPopupsEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& da
break;
}
case North: {
const double splitPoint = w->height() - (w->y() + w->height() - screenRect.y() - start) + w->height() * (appearing ? 1.0 - progress : progress);
const double splitPoint = geo.height() - (geo.y() + geo.height() - screenRect.y() - start) + geo.height() * (appearing ? 1.0 - progress : progress);
data.quads = data.quads.splitAtY(splitPoint);
WindowQuadList filtered;
foreach (const WindowQuad &quad, data.quads) {
@ -130,7 +132,7 @@ void SlidingPopupsEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& da
break;
}
case East: {
const double splitPoint = screenRect.x() + screenRect.width() - w->x() - start - w->width() * (appearing ? 1.0 - progress : progress);
const double splitPoint = screenRect.x() + screenRect.width() - geo.x() - start - geo.width() * (appearing ? 1.0 - progress : progress);
data.quads = data.quads.splitAtX(splitPoint);
WindowQuadList filtered;
foreach (const WindowQuad &quad, data.quads) {
@ -143,7 +145,7 @@ void SlidingPopupsEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& da
}
case South:
default: {
const double splitPoint = screenRect.y() + screenRect.height() - w->y() - start - w->height() * (appearing ? 1.0 - progress : progress);
const double splitPoint = screenRect.y() + screenRect.height() - geo.y() - start - geo.height() * (appearing ? 1.0 - progress : progress);
data.quads = data.quads.splitAtY(splitPoint);
WindowQuadList filtered;
foreach (const WindowQuad &quad, data.quads) {
@ -187,27 +189,28 @@ void SlidingPopupsEffect::paintWindow(EffectWindow* w, int mask, QRegion region,
const QRect screenRect = effects->clientArea(FullScreenArea, w->screen(), w->desktop());
int splitPoint = 0;
const QRect geo = w->expandedGeometry();
switch(mWindowsData[ w ].from) {
case West:
data.translate(- w->width() * progress);
splitPoint = w->width() - (w->x() + w->width() - screenRect.x() - start);
region = QRegion(w->x() + splitPoint, w->y(), w->width() - splitPoint, w->height());
data.translate(- geo.width() * progress);
splitPoint = geo.width() - (geo.x() + geo.width() - screenRect.x() - start);
region = QRegion(geo.x() + splitPoint, geo.y(), geo.width() - splitPoint, geo.height());
break;
case North:
data.translate(0.0, - w->height() * progress);
splitPoint = w->height() - (w->y() + w->height() - screenRect.y() - start);
region = QRegion(w->x(), w->y() + splitPoint, w->width(), w->height() - splitPoint);
data.translate(0.0, - geo.height() * progress);
splitPoint = geo.height() - (geo.y() + geo.height() - screenRect.y() - start);
region = QRegion(geo.x(), geo.y() + splitPoint, geo.width(), geo.height() - splitPoint);
break;
case East:
data.translate(w->width() * progress);
splitPoint = screenRect.x() + screenRect.width() - w->x() - start;
region = QRegion(w->x(), w->y(), splitPoint, w->height());
data.translate(geo.width() * progress);
splitPoint = screenRect.x() + screenRect.width() - geo.x() - start;
region = QRegion(geo.x(), geo.y(), splitPoint, geo.height());
break;
case South:
default:
data.translate(0.0, w->height() * progress);
splitPoint = screenRect.y() + screenRect.height() - w->y() - start;
region = QRegion(w->x(), w->y(), w->width(), splitPoint);
data.translate(0.0, geo.height() * progress);
splitPoint = screenRect.y() + screenRect.height() - geo.y() - start;
region = QRegion(geo.x(), geo.y(), geo.width(), splitPoint);
}
}

View file

@ -57,9 +57,10 @@ void ThumbnailAsideEffect::reconfigure(ReconfigureFlags)
void ThumbnailAsideEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
{
painted = QRegion();
effects->paintScreen(mask, region, data);
foreach (const Data & d, windows) {
if (region.contains(d.rect)) {
if (painted.intersects(d.rect)) {
WindowPaintData data(d.window);
data.multiplyOpacity(opacity);
QRect region;
@ -70,6 +71,12 @@ void ThumbnailAsideEffect::paintScreen(int mask, QRegion region, ScreenPaintData
}
}
void ThumbnailAsideEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
{
effects->paintWindow(w, mask, region, data);
painted |= region;
}
void ThumbnailAsideEffect::slotWindowDamaged(EffectWindow* w, const QRect&)
{
foreach (const Data & d, windows) {

View file

@ -47,6 +47,7 @@ public:
ThumbnailAsideEffect();
virtual void reconfigure(ReconfigureFlags);
virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
virtual void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data);
// for properties
int configuredMaxWidth() const {
@ -82,6 +83,7 @@ private:
int spacing;
double opacity;
int screen;
QRegion painted;
};
} // namespace

View file

@ -42,6 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kaction.h>
#include <kconfiggroup.h>
#include <kcmdlineargs.h>
#include <kdeversion.h>
#include <QtDBus/QtDBus>
#include "client.h"
@ -1973,6 +1974,20 @@ QString Workspace::supportInformation() const
// all following strings are intended for support. They need to be pasted to e.g forums.kde.org
// it is expected that the support will happen in English language or that the people providing
// help understand English. Because of that all texts are not translated
support.append("Version\n");
support.append("=======\n");
support.append("KWin version: ");
support.append(KWIN_VERSION_STRING);
support.append('\n');
support.append("KDE SC version (runtime): ");
support.append(KDE::versionString());
support.append('\n');
support.append("KDE SC version (compile): ");
support.append(KDE_VERSION_STRING);
support.append('\n');
support.append("Qt Version: ");
support.append(qVersion());
support.append("\n\n");
support.append("Options\n");
support.append("=======\n");
const QMetaObject *metaOptions = options->metaObject();