Fixed cube from crashing due to mouse polling if it was activated and
deactivated too quickly. svn path=/trunk/KDE/kdebase/workspace/; revision=922457
This commit is contained in:
parent
a604e4a60d
commit
1db192a11d
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 )
|
||||
|
@ -1615,7 +1616,11 @@ void CubeEffect::setActive( bool active )
|
|||
{
|
||||
if( active )
|
||||
{
|
||||
effects->startMousePolling();
|
||||
if( !mousePolling )
|
||||
{
|
||||
effects->startMousePolling();
|
||||
mousePolling = true;
|
||||
}
|
||||
activated = true;
|
||||
activeScreen = effects->activeScreen();
|
||||
keyboard_grab = effects->grabKeyboard( this );
|
||||
|
@ -1662,7 +1667,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();
|
||||
|
|
|
@ -77,6 +77,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