Remove the temporary hacks again.
svn path=/branches/work/kwin_composite/; revision=558185
This commit is contained in:
parent
a23d4f820b
commit
06e47c10db
4 changed files with 3 additions and 51 deletions
|
@ -89,8 +89,7 @@ Client::Client( Workspace *ws )
|
|||
border_bottom( 0 ),
|
||||
sm_stacking_order( -1 ),
|
||||
demandAttentionKNotifyTimer( NULL ),
|
||||
damage( None ),
|
||||
appear_stage( 0 )
|
||||
damage( None )
|
||||
// SELI do all as initialization
|
||||
{
|
||||
autoRaiseTimer = 0;
|
||||
|
|
4
client.h
4
client.h
|
@ -296,9 +296,6 @@ class Client
|
|||
void setShapable(bool b);
|
||||
bool hasStrut() const;
|
||||
|
||||
int appearStage() const { return appear_stage; }
|
||||
void appearStep() { if (appear_stage > 0 ) --appear_stage; }
|
||||
|
||||
private slots:
|
||||
void autoRaise();
|
||||
void shadeHover();
|
||||
|
@ -546,7 +543,6 @@ class Client
|
|||
bool isBMP_;
|
||||
QTimer* demandAttentionKNotifyTimer;
|
||||
Damage damage;
|
||||
int appear_stage;
|
||||
};
|
||||
|
||||
// helper for Client::postponeGeometryUpdates() being called in pairs (true/false)
|
||||
|
|
|
@ -52,60 +52,22 @@ void Workspace::setDamaged()
|
|||
|
||||
void Workspace::compositeTimeout()
|
||||
{
|
||||
bool effect = false;
|
||||
for( ClientList::ConstIterator it = clients.begin();
|
||||
it != clients.end();
|
||||
++it )
|
||||
{
|
||||
if( (*it)->appearStage())
|
||||
{
|
||||
effect = true;
|
||||
(*it)->appearStep();
|
||||
}
|
||||
}
|
||||
#define EFF
|
||||
#ifdef EFF
|
||||
const int SPD = 10;
|
||||
static int cnt = 0;
|
||||
int olds = cnt / SPD;
|
||||
++cnt;
|
||||
if( cnt == 8 * SPD )
|
||||
cnt = 0;
|
||||
int s = cnt / SPD;
|
||||
if( !damaged && s == olds && !effect )
|
||||
if( !damaged )
|
||||
return;
|
||||
#else
|
||||
if( !damaged && !effect )
|
||||
return;
|
||||
#endif
|
||||
XGCValues val;
|
||||
val.foreground = WhitePixel( display(), DefaultScreen( display()));
|
||||
val.subwindow_mode = IncludeInferiors;
|
||||
GC gc = XCreateGC( display(), composite_pixmap, GCForeground | GCSubwindowMode, &val );
|
||||
XFillRectangle( display(), composite_pixmap, gc, 0, 0, displayWidth(), displayHeight());
|
||||
#ifdef EFF
|
||||
val.fill_style = FillStippled;
|
||||
char data[] = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x00 };
|
||||
data[ s ] = 1 << s;
|
||||
val.stipple = XCreateBitmapFromData( display(), rootWindow(), data, 8, 8 );
|
||||
val.foreground = BlackPixel( display(), DefaultScreen( display()));
|
||||
GC gc2 = XCreateGC( display(), composite_pixmap, GCForeground | GCSubwindowMode | GCFillStyle | GCStipple, &val );
|
||||
#endif
|
||||
for( ClientList::ConstIterator it = stackingOrder().begin();
|
||||
it != stackingOrder().end();
|
||||
++it )
|
||||
{
|
||||
QRect r = (*it)->geometry();
|
||||
if( (*it)->appearStage())
|
||||
r.setHeight( r.height() * ( 20 - (*it)->appearStage()) / 20 );
|
||||
r = r.intersect( QRect( 0, 0, displayWidth(), displayHeight()));
|
||||
QRect r = (*it)->geometry().intersect( QRect( 0, 0, displayWidth(), displayHeight()));
|
||||
if( !r.isEmpty())
|
||||
{
|
||||
XCopyArea( display(), (*it)->windowPixmap(), composite_pixmap, gc,
|
||||
qMax( 0, -(*it)->x()), qMax( 0, -(*it)->y()), r.width(), r.height(), r.x(), r.y());
|
||||
#ifdef EFF
|
||||
XFillRectangle( display(), composite_pixmap, gc2, r.x(), r.y(), r.width(), r.height());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
for( UnmanagedList::ConstIterator it = unmanaged.begin();
|
||||
|
@ -118,10 +80,6 @@ void Workspace::compositeTimeout()
|
|||
qMax( 0, -(*it)->x()), qMax( 0, -(*it)->y()), r.width(), r.height(), r.x(), r.y());
|
||||
}
|
||||
XCopyArea( display(), composite_pixmap, rootWindow(), gc, 0, 0, displayWidth(), displayHeight(), 0, 0 );
|
||||
#ifdef EFF
|
||||
XFreePixmap( display(), val.stipple );
|
||||
XFreeGC( display(), gc2 );
|
||||
#endif
|
||||
XFreeGC( display(), gc );
|
||||
XFlush( display());
|
||||
damaged = false;
|
||||
|
|
|
@ -54,7 +54,6 @@ bool Client::manage( Window w, bool isMapped )
|
|||
embedClient( w, attr );
|
||||
|
||||
setupCompositing();
|
||||
appear_stage = 20;
|
||||
|
||||
// SELI order all these things in some sane manner
|
||||
|
||||
|
|
Loading…
Reference in a new issue