Backport: Fixed cube from crashing due to mouse polling if it was
activated and deactivated too quickly. svn path=/branches/KDE/4.2/kdebase/workspace/; revision=922459
This commit is contained in:
parent
9bb76644b7
commit
188a47f0db
2 changed files with 12 additions and 2 deletions
|
@ -46,6 +46,7 @@ KWIN_EFFECT_SUPPORTED( cube, CubeEffect::supported() )
|
|||
|
||||
CubeEffect::CubeEffect()
|
||||
: activated( false )
|
||||
, mousePolling( false )
|
||||
, cube_painting( false )
|
||||
, keyboard_grab( false )
|
||||
, schedule_close( false )
|
||||
|
@ -1537,7 +1538,11 @@ void CubeEffect::setActive( bool active )
|
|||
{
|
||||
if( active )
|
||||
{
|
||||
effects->startMousePolling();
|
||||
if( !mousePolling )
|
||||
{
|
||||
effects->startMousePolling();
|
||||
mousePolling = true;
|
||||
}
|
||||
activated = true;
|
||||
activeScreen = effects->activeScreen();
|
||||
if( !slide )
|
||||
|
@ -1575,7 +1580,11 @@ void CubeEffect::setActive( bool active )
|
|||
}
|
||||
else
|
||||
{
|
||||
effects->stopMousePolling();
|
||||
if( mousePolling )
|
||||
{
|
||||
effects->stopMousePolling();
|
||||
mousePolling = false;
|
||||
}
|
||||
schedule_close = true;
|
||||
// we have to add a repaint, to start the deactivating
|
||||
effects->addRepaintFull();
|
||||
|
|
|
@ -75,6 +75,7 @@ class CubeEffect
|
|||
void rotateToDesktop( int desktop );
|
||||
void setActive( bool active );
|
||||
bool activated;
|
||||
bool mousePolling;
|
||||
bool cube_painting;
|
||||
bool keyboard_grab;
|
||||
bool schedule_close;
|
||||
|
|
Loading…
Reference in a new issue