~ubuntu-branches/ubuntu/precise/kde-workspace/precise-security

« back to all changes in this revision

Viewing changes to kwin/effects/slide/slide.cpp

Tags: upstream-4.7.2
Import upstream version 4.7.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
{
64
64
    if (slide) {
65
65
        if (w->isOnAllDesktops()) {
66
 
            if (slide_painting_sticky)
67
 
                data.setTransformed();
68
 
            else
 
66
            if (!slide_painting_sticky)
69
67
                w->disablePainting(EffectWindow::PAINT_DISABLED_BY_DESKTOP);
70
 
        } else if (w->isOnDesktop(painting_desktop))
 
68
        } else if (w->isOnDesktop(painting_desktop)) {
 
69
            data.setTransformed();
71
70
            w->enablePainting(EffectWindow::PAINT_DISABLED_BY_DESKTOP);
72
 
        else
 
71
        } else {
73
72
            w->disablePainting(EffectWindow::PAINT_DISABLED_BY_DESKTOP);
 
73
        }
74
74
    }
75
75
    effects->prePaintWindow(w, data, time);
76
76
}
133
133
                    slide_painting_diff.setY(slide_painting_diff.y() + h);
134
134
            }
135
135
            do_sticky = false; // paint on-all-desktop windows only once
136
 
            ScreenPaintData d = data;
137
 
            d.xTranslate += slide_painting_diff.x();
138
 
            d.yTranslate += slide_painting_diff.y();
139
136
            // TODO mask parts that are not visible?
140
 
            effects->paintScreen(mask, region, d);
 
137
            effects->paintScreen(mask, region, data);
141
138
        }
142
139
    }
143
140
}
146
143
{
147
144
    if (slide) {
148
145
        // don't move windows on all desktops (compensate screen transformation)
149
 
        if (w->isOnAllDesktops()) { // TODO also fix 'Workspace::movingClient'
150
 
            data.xTranslate -= slide_painting_diff.x();
151
 
            data.yTranslate -= slide_painting_diff.y();
 
146
        if (!w->isOnAllDesktops()) { // TODO also fix 'Workspace::movingClient'
 
147
            data.xTranslate += slide_painting_diff.x();
 
148
            data.yTranslate += slide_painting_diff.y();
152
149
        }
153
150
    }
154
151
    effects->paintWindow(w, mask, region, data);