Better painting of moved window.
svn path=/branches/work/kwin_composite/; revision=656410
This commit is contained in:
parent
7250a8edcd
commit
0040bb699b
3 changed files with 36 additions and 13 deletions
|
@ -179,6 +179,12 @@ Effects framework TODO
|
||||||
|
|
||||||
* check Scene::updateTimeDiff() - should the time be 0 or 1?
|
* check Scene::updateTimeDiff() - should the time be 0 or 1?
|
||||||
|
|
||||||
|
* DesktopGridEffect has somewhat broken stacking order while moving windows
|
||||||
|
- the window is in proper layer when on its desktop but on top of everything when moved
|
||||||
|
to another desktop, due to its desktop being painted later
|
||||||
|
- maybe there should be PAINT_WINDOW_TOP (_LAST or whatever) that'd make it painted always
|
||||||
|
on top of everything
|
||||||
|
|
||||||
|
|
||||||
Effects TODO
|
Effects TODO
|
||||||
===============================
|
===============================
|
||||||
|
|
|
@ -98,7 +98,11 @@ void DesktopGridEffect::prePaintWindow( EffectWindow* w, int* mask, QRegion* pai
|
||||||
else
|
else
|
||||||
w->disablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP );
|
w->disablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP );
|
||||||
if( w == window_move )
|
if( w == window_move )
|
||||||
|
{
|
||||||
*mask |= PAINT_WINDOW_TRANSFORMED;
|
*mask |= PAINT_WINDOW_TRANSFORMED;
|
||||||
|
if( w->isOnAllDesktops() && painting_desktop != effects->currentDesktop())
|
||||||
|
w->disablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
effects->prePaintWindow( w, mask, paint, clip, time );
|
effects->prePaintWindow( w, mask, paint, clip, time );
|
||||||
}
|
}
|
||||||
|
@ -115,10 +119,23 @@ void DesktopGridEffect::paintScreen( int mask, QRegion region, ScreenPaintData&
|
||||||
paintSlide( mask, region, data );
|
paintSlide( mask, region, data );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
int desktop_with_move = -1;
|
||||||
|
if( window_move != NULL )
|
||||||
|
desktop_with_move = window_move->isOnAllDesktops() ? effects->currentDesktop() : window_move->desktop();
|
||||||
for( int desktop = 1;
|
for( int desktop = 1;
|
||||||
desktop <= effects->numberOfDesktops();
|
desktop <= effects->numberOfDesktops();
|
||||||
++desktop )
|
++desktop )
|
||||||
{
|
{
|
||||||
|
if( desktop != desktop_with_move )
|
||||||
|
paintScreenDesktop( desktop, mask, region, data );
|
||||||
|
}
|
||||||
|
// paint the desktop with the window being moved as the last one, i.e. on top of others
|
||||||
|
if( desktop_with_move != -1 )
|
||||||
|
paintScreenDesktop( desktop_with_move, mask, region, data );
|
||||||
|
}
|
||||||
|
|
||||||
|
void DesktopGridEffect::paintScreenDesktop( int desktop, int mask, QRegion region, ScreenPaintData data )
|
||||||
|
{
|
||||||
QRect rect = desktopRect( desktop, true );
|
QRect rect = desktopRect( desktop, true );
|
||||||
if( region.contains( rect )) // this desktop needs painting
|
if( region.contains( rect )) // this desktop needs painting
|
||||||
{
|
{
|
||||||
|
@ -133,7 +150,6 @@ void DesktopGridEffect::paintScreen( int mask, QRegion region, ScreenPaintData&
|
||||||
effects->paintScreen( mask, region, d );
|
effects->paintScreen( mask, region, d );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void DesktopGridEffect::paintSlide( int mask, QRegion region, const ScreenPaintData& data )
|
void DesktopGridEffect::paintSlide( int mask, QRegion region, const ScreenPaintData& data )
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,6 +42,7 @@ class DesktopGridEffect
|
||||||
void setup();
|
void setup();
|
||||||
void finish();
|
void finish();
|
||||||
void paintSlide( int mask, QRegion region, const ScreenPaintData& data );
|
void paintSlide( int mask, QRegion region, const ScreenPaintData& data );
|
||||||
|
void paintScreenDesktop( int desktop, int mask, QRegion region, ScreenPaintData data );
|
||||||
void slideDesktopChanged( int old );
|
void slideDesktopChanged( int old );
|
||||||
float progress;
|
float progress;
|
||||||
bool activated;
|
bool activated;
|
||||||
|
|
Loading…
Reference in a new issue