From 06e47c10db59666c5d9d948d5aec94faa10c570b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 4 Jul 2006 20:32:43 +0000 Subject: [PATCH] Remove the temporary hacks again. svn path=/branches/work/kwin_composite/; revision=558185 --- client.cpp | 3 +-- client.h | 4 ---- composite.cpp | 46 ++-------------------------------------------- manage.cpp | 1 - 4 files changed, 3 insertions(+), 51 deletions(-) diff --git a/client.cpp b/client.cpp index 5761bb8a60..c814e04fb5 100644 --- a/client.cpp +++ b/client.cpp @@ -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; diff --git a/client.h b/client.h index d25589fd6c..74760f323c 100644 --- a/client.h +++ b/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) diff --git a/composite.cpp b/composite.cpp index 3eb1eaa0b9..bc0f40e45d 100644 --- a/composite.cpp +++ b/composite.cpp @@ -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; diff --git a/manage.cpp b/manage.cpp index 2c5fb900f1..2206fe18dd 100644 --- a/manage.cpp +++ b/manage.cpp @@ -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