Mouse polling was deactivated wrongly in all zooming effects.
BUG: 183983 svn path=/trunk/KDE/kdebase/workspace/; revision=960048
This commit is contained in:
parent
2830385a40
commit
7b2f79428a
3 changed files with 52 additions and 14 deletions
|
@ -74,10 +74,25 @@ void LookingGlassEffect::reconfigure( ReconfigureFlags )
|
|||
void LookingGlassEffect::toggle()
|
||||
{
|
||||
if( target_zoom == 1.0f )
|
||||
{
|
||||
target_zoom = 2.0f;
|
||||
if( !polling )
|
||||
{
|
||||
polling = true;
|
||||
effects->startMousePolling();
|
||||
}
|
||||
setEnabled( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
target_zoom = 1.0f;
|
||||
setEnabled( true );
|
||||
if( polling )
|
||||
{
|
||||
polling = false;
|
||||
effects->stopMousePolling();
|
||||
}
|
||||
setEnabled( false );
|
||||
}
|
||||
}
|
||||
|
||||
void LookingGlassEffect::zoomIn()
|
||||
|
@ -99,11 +114,11 @@ void LookingGlassEffect::zoomOut()
|
|||
{
|
||||
target_zoom = 1;
|
||||
setEnabled( false );
|
||||
}
|
||||
if( polling )
|
||||
{
|
||||
polling = false;
|
||||
effects->stopMousePolling();
|
||||
if( polling )
|
||||
{
|
||||
polling = false;
|
||||
effects->stopMousePolling();
|
||||
}
|
||||
}
|
||||
effects->addRepaint( cursorPos().x() - radius, cursorPos().y() - radius, 2*radius, 2*radius );
|
||||
}
|
||||
|
|
|
@ -161,11 +161,13 @@ void MagnifierEffect::zoomOut()
|
|||
{
|
||||
target_zoom /= 1.2;
|
||||
if( target_zoom < 1 )
|
||||
target_zoom = 1;
|
||||
if( polling )
|
||||
{
|
||||
polling = false;
|
||||
effects->stopMousePolling();
|
||||
target_zoom = 1;
|
||||
if( polling )
|
||||
{
|
||||
polling = false;
|
||||
effects->stopMousePolling();
|
||||
}
|
||||
}
|
||||
effects->addRepaint( magnifierArea().adjusted( -FRAME_WIDTH, -FRAME_WIDTH, FRAME_WIDTH, FRAME_WIDTH ));
|
||||
}
|
||||
|
@ -173,9 +175,23 @@ void MagnifierEffect::zoomOut()
|
|||
void MagnifierEffect::toggle()
|
||||
{
|
||||
if( target_zoom == 1.0 )
|
||||
{
|
||||
target_zoom = 2;
|
||||
if( !polling )
|
||||
{
|
||||
polling = true;
|
||||
effects->startMousePolling();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
target_zoom = 1;
|
||||
if( polling )
|
||||
{
|
||||
polling = false;
|
||||
effects->stopMousePolling();
|
||||
}
|
||||
}
|
||||
effects->addRepaint( magnifierArea().adjusted( -FRAME_WIDTH, -FRAME_WIDTH, FRAME_WIDTH, FRAME_WIDTH ));
|
||||
}
|
||||
|
||||
|
|
|
@ -95,11 +95,13 @@ void ZoomEffect::zoomOut()
|
|||
{
|
||||
target_zoom /= 1.2;
|
||||
if( target_zoom < 1 )
|
||||
target_zoom = 1;
|
||||
if( polling )
|
||||
{
|
||||
polling = false;
|
||||
effects->stopMousePolling();
|
||||
target_zoom = 1;
|
||||
if( polling )
|
||||
{
|
||||
polling = false;
|
||||
effects->stopMousePolling();
|
||||
}
|
||||
}
|
||||
effects->addRepaintFull();
|
||||
}
|
||||
|
@ -107,6 +109,11 @@ void ZoomEffect::zoomOut()
|
|||
void ZoomEffect::actualSize()
|
||||
{
|
||||
target_zoom = 1;
|
||||
if( polling )
|
||||
{
|
||||
polling = false;
|
||||
effects->stopMousePolling();
|
||||
}
|
||||
effects->addRepaintFull();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue