Added option to hide minimized windows in the present windows effect. Patch by Bart Cerneels.
svn path=/trunk/KDE/kdebase/workspace/; revision=874292
This commit is contained in:
parent
e902abfce1
commit
9f8df08268
4 changed files with 22 additions and 1 deletions
|
@ -45,6 +45,7 @@ PresentWindowsEffect::PresentWindowsEffect()
|
|||
, m_borderActivateAll( ElectricNone )
|
||||
, m_activated( false )
|
||||
, m_allDesktops( false )
|
||||
, m_ignoreMinimized( false )
|
||||
, m_decalOpacity( 0.0 )
|
||||
//, m_input()
|
||||
, m_hasKeyboardGrab( false )
|
||||
|
@ -92,6 +93,7 @@ void PresentWindowsEffect::reconfigure( ReconfigureFlags )
|
|||
m_showCaptions = conf.readEntry( "DrawWindowCaptions", true );
|
||||
m_showIcons = conf.readEntry( "DrawWindowIcons", true );
|
||||
m_tabBoxAllowed = conf.readEntry( "TabBox", false );
|
||||
m_ignoreMinimized = conf.readEntry( "IgnoreMinimized", false );
|
||||
m_accuracy = conf.readEntry( "Accuracy", 1 ) * 20;
|
||||
m_fillGaps = conf.readEntry( "FillGaps", true );
|
||||
m_fadeDuration = double( animationTime( 150 ));
|
||||
|
@ -1091,6 +1093,8 @@ void PresentWindowsEffect::setActive( bool active )
|
|||
{
|
||||
m_windowData[w].visible = isVisibleWindow( w );
|
||||
m_windowData[w].opacity = w->isOnCurrentDesktop() ? 1.0 : 0.0;
|
||||
if( m_ignoreMinimized && w->isMinimized() )
|
||||
m_windowData[w].opacity = 0.0;
|
||||
m_windowData[w].highlight = 1.0;
|
||||
}
|
||||
|
||||
|
@ -1225,6 +1229,8 @@ bool PresentWindowsEffect::isSelectableWindow( EffectWindow *w )
|
|||
return false;
|
||||
if( !m_allDesktops && !w->isOnCurrentDesktop() )
|
||||
return false;
|
||||
if( m_ignoreMinimized && w->isMinimized() )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -143,6 +143,7 @@ class PresentWindowsEffect
|
|||
// Activation
|
||||
bool m_activated;
|
||||
bool m_allDesktops;
|
||||
bool m_ignoreMinimized;
|
||||
double m_decalOpacity;
|
||||
Window m_input;
|
||||
bool m_hasKeyboardGrab;
|
||||
|
|
|
@ -90,6 +90,7 @@ PresentWindowsEffectConfig::PresentWindowsEffectConfig(QWidget* parent, const QV
|
|||
connect( m_ui->displayTitleBox, SIGNAL( stateChanged( int )), this, SLOT( changed() ));
|
||||
connect( m_ui->displayIconBox, SIGNAL( stateChanged( int )), this, SLOT( changed() ));
|
||||
connect( m_ui->switchingBox, SIGNAL( stateChanged( int )), this, SLOT( changed() ));
|
||||
connect( m_ui->ignoreMinimizedBox, SIGNAL( stateChanged( int )), this, SLOT( changed() ));
|
||||
connect( m_ui->accuracySlider, SIGNAL( valueChanged( int )), this, SLOT( changed() ));
|
||||
connect( m_ui->fillGapsBox, SIGNAL( stateChanged( int )), this, SLOT( changed() ));
|
||||
connect( m_ui->screenEdgeAllCombo, SIGNAL( currentIndexChanged( int )), this, SLOT( changed() ));
|
||||
|
@ -125,6 +126,9 @@ void PresentWindowsEffectConfig::load()
|
|||
bool switching = conf.readEntry( "TabBox", false );
|
||||
m_ui->switchingBox->setChecked( switching );
|
||||
|
||||
bool ignoreMinimized = conf.readEntry( "IgnoreMinimized", false );
|
||||
m_ui->ignoreMinimizedBox->setChecked( ignoreMinimized );
|
||||
|
||||
int accuracy = conf.readEntry( "Accuracy", 1 );
|
||||
m_ui->accuracySlider->setSliderPosition( accuracy );
|
||||
|
||||
|
@ -158,6 +162,7 @@ void PresentWindowsEffectConfig::save()
|
|||
conf.writeEntry( "DrawWindowCaptions", m_ui->displayTitleBox->isChecked() );
|
||||
conf.writeEntry( "DrawWindowIcons", m_ui->displayIconBox->isChecked() );
|
||||
conf.writeEntry( "TabBox", m_ui->switchingBox->isChecked() );
|
||||
conf.writeEntry( "IgnoreMinimized", m_ui->ignoreMinimizedBox->isChecked() );
|
||||
|
||||
int accuracy = m_ui->accuracySlider->value();
|
||||
conf.writeEntry( "Accuracy", accuracy );
|
||||
|
@ -189,6 +194,7 @@ void PresentWindowsEffectConfig::defaults()
|
|||
m_ui->displayTitleBox->setChecked( true );
|
||||
m_ui->displayIconBox->setChecked( true );
|
||||
m_ui->switchingBox->setChecked( false );
|
||||
m_ui->ignoreMinimizedBox->setChecked( false );
|
||||
m_ui->accuracySlider->setSliderPosition( 1 );
|
||||
m_ui->fillGapsBox->setChecked( true );
|
||||
m_ui->screenEdgeAllCombo->setCurrentIndex( int( ElectricTopLeft ));
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>474</width>
|
||||
<height>306</height>
|
||||
<height>333</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
|
@ -113,6 +113,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<widget class="QCheckBox" name="ignoreMinimizedBox" >
|
||||
<property name="text" >
|
||||
<string>Ignore &minimized windows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -286,6 +293,7 @@
|
|||
<tabstop>displayTitleBox</tabstop>
|
||||
<tabstop>displayIconBox</tabstop>
|
||||
<tabstop>switchingBox</tabstop>
|
||||
<tabstop>ignoreMinimizedBox</tabstop>
|
||||
<tabstop>accuracySlider</tabstop>
|
||||
<tabstop>fillGapsBox</tabstop>
|
||||
<tabstop>screenEdgeAllCombo</tabstop>
|
||||
|
|
Loading…
Reference in a new issue