Option to not animate windows shown on all desktops during desktop switching animation.
svn path=/trunk/KDE/kdebase/workspace/; revision=922030
This commit is contained in:
parent
7b5a71d2dd
commit
a3c57fcab0
4 changed files with 133 additions and 50 deletions
|
@ -141,7 +141,8 @@ void CubeEffect::loadConfig( QString config )
|
||||||
useForTabBox = conf.readEntry( "TabBox", false );
|
useForTabBox = conf.readEntry( "TabBox", false );
|
||||||
invertKeys = conf.readEntry( "InvertKeys", false );
|
invertKeys = conf.readEntry( "InvertKeys", false );
|
||||||
invertMouse = conf.readEntry( "InvertMouse", false );
|
invertMouse = conf.readEntry( "InvertMouse", false );
|
||||||
dontSlidePanels = conf.readEntry( "DontSlidePanels", false );
|
dontSlidePanels = conf.readEntry( "DontSlidePanels", true );
|
||||||
|
dontSlideStickyWindows = conf.readEntry( "DontSlideStickyWindows", true );
|
||||||
QString file = conf.readEntry( "Wallpaper", QString("") );
|
QString file = conf.readEntry( "Wallpaper", QString("") );
|
||||||
if( wallpaper )
|
if( wallpaper )
|
||||||
wallpaper->discard();
|
wallpaper->discard();
|
||||||
|
@ -234,6 +235,8 @@ void CubeEffect::prePaintScreen( ScreenPrePaintData& data, int time )
|
||||||
recompileList = true;
|
recompileList = true;
|
||||||
if( dontSlidePanels )
|
if( dontSlidePanels )
|
||||||
panels.clear();
|
panels.clear();
|
||||||
|
if( dontSlideStickyWindows )
|
||||||
|
stickyWindows.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
effects->prePaintScreen( data, time );
|
effects->prePaintScreen( data, time );
|
||||||
|
@ -558,6 +561,14 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
|
||||||
effects->paintWindow( w, 0, QRegion( w->x(), w->y(), w->width(), w->height() ), wData );
|
effects->paintWindow( w, 0, QRegion( w->x(), w->y(), w->width(), w->height() ), wData );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( slide && dontSlideStickyWindows )
|
||||||
|
{
|
||||||
|
foreach( EffectWindow* w, stickyWindows )
|
||||||
|
{
|
||||||
|
WindowPaintData wData( w );
|
||||||
|
effects->paintWindow( w, 0, QRegion( w->x(), w->y(), w->width(), w->height() ), wData );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1040,6 +1051,7 @@ void CubeEffect::postPaintScreen()
|
||||||
effects->destroyInputWindow( input );
|
effects->destroyInputWindow( input );
|
||||||
windowsOnOtherScreens.clear();
|
windowsOnOtherScreens.clear();
|
||||||
panels.clear();
|
panels.clear();
|
||||||
|
stickyWindows.clear();
|
||||||
|
|
||||||
effects->setActiveFullScreenEffect( 0 );
|
effects->setActiveFullScreenEffect( 0 );
|
||||||
|
|
||||||
|
@ -1264,9 +1276,14 @@ void CubeEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int
|
||||||
}
|
}
|
||||||
w->disablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP );
|
w->disablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP );
|
||||||
}
|
}
|
||||||
if( slide && dontSlidePanels && w->isDock() && painting_desktop == effects->currentDesktop() )
|
if( slide && dontSlidePanels && w->isDock())
|
||||||
{
|
{
|
||||||
panels.append( w );
|
panels.insert( w );
|
||||||
|
}
|
||||||
|
if( slide && dontSlideStickyWindows && !w->isDock() &&
|
||||||
|
!w->isDesktop() && w->isOnAllDesktops())
|
||||||
|
{
|
||||||
|
stickyWindows.insert( w );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1279,6 +1296,9 @@ void CubeEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowP
|
||||||
{
|
{
|
||||||
if( slide && dontSlidePanels && w->isDock() )
|
if( slide && dontSlidePanels && w->isDock() )
|
||||||
return;
|
return;
|
||||||
|
if( slide && dontSlideStickyWindows &&
|
||||||
|
w->isOnAllDesktops() && !w->isDock() && !w->isDesktop() )
|
||||||
|
return;
|
||||||
//kDebug(1212) << w->caption();
|
//kDebug(1212) << w->caption();
|
||||||
float opacity = cubeOpacity;
|
float opacity = cubeOpacity;
|
||||||
if( slide )
|
if( slide )
|
||||||
|
|
|
@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <kwinglutils.h>
|
#include <kwinglutils.h>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QQueue>
|
#include <QQueue>
|
||||||
|
#include <QSet>
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
@ -116,7 +117,8 @@ class CubeEffect
|
||||||
int oldDesktop;
|
int oldDesktop;
|
||||||
int rotationDuration;
|
int rotationDuration;
|
||||||
QList<EffectWindow*> windowsOnOtherScreens;
|
QList<EffectWindow*> windowsOnOtherScreens;
|
||||||
QList<EffectWindow*> panels;
|
QSet<EffectWindow*> panels;
|
||||||
|
QSet<EffectWindow*> stickyWindows;
|
||||||
int activeScreen;
|
int activeScreen;
|
||||||
bool animateDesktopChange;
|
bool animateDesktopChange;
|
||||||
bool bigCube;
|
bool bigCube;
|
||||||
|
@ -129,6 +131,7 @@ class CubeEffect
|
||||||
bool invertMouse;
|
bool invertMouse;
|
||||||
bool tabBoxMode;
|
bool tabBoxMode;
|
||||||
bool dontSlidePanels;
|
bool dontSlidePanels;
|
||||||
|
bool dontSlideStickyWindows;
|
||||||
bool shortcutsRegistered;
|
bool shortcutsRegistered;
|
||||||
|
|
||||||
// GL lists
|
// GL lists
|
||||||
|
|
|
@ -85,6 +85,7 @@ CubeEffectConfig::CubeEffectConfig(QWidget* parent, const QVariantList& args) :
|
||||||
connect(m_ui->invertKeysBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
connect(m_ui->invertKeysBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||||
connect(m_ui->invertMouseBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
connect(m_ui->invertMouseBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||||
connect(m_ui->dontSlidePanelsBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
connect(m_ui->dontSlidePanelsBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||||
|
connect(m_ui->dontSlideStickyWindowsBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||||
|
|
||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
|
@ -112,7 +113,8 @@ void CubeEffectConfig::load()
|
||||||
m_ui->wallpaperRequester->setPath( conf.readEntry( "Wallpaper", "" ) );
|
m_ui->wallpaperRequester->setPath( conf.readEntry( "Wallpaper", "" ) );
|
||||||
bool invertKeys = conf.readEntry( "InvertKeys", false );
|
bool invertKeys = conf.readEntry( "InvertKeys", false );
|
||||||
bool invertMouse = conf.readEntry( "InvertMouse", false );
|
bool invertMouse = conf.readEntry( "InvertMouse", false );
|
||||||
bool dontSlidePanels = conf.readEntry( "DontSlidePanels", false );
|
bool dontSlidePanels = conf.readEntry( "DontSlidePanels", true );
|
||||||
|
bool dontSlideStickyWindows = conf.readEntry( "DontSlideStickyWindows", true );
|
||||||
|
|
||||||
m_ui->rotationDurationSpin->setValue( duration );
|
m_ui->rotationDurationSpin->setValue( duration );
|
||||||
m_ui->cubeOpacitySlider->setValue( opacity );
|
m_ui->cubeOpacitySlider->setValue( opacity );
|
||||||
|
@ -187,6 +189,7 @@ void CubeEffectConfig::load()
|
||||||
m_ui->invertKeysBox->setChecked( invertKeys );
|
m_ui->invertKeysBox->setChecked( invertKeys );
|
||||||
m_ui->invertMouseBox->setChecked( invertMouse );
|
m_ui->invertMouseBox->setChecked( invertMouse );
|
||||||
m_ui->dontSlidePanelsBox->setChecked( dontSlidePanels );
|
m_ui->dontSlidePanelsBox->setChecked( dontSlidePanels );
|
||||||
|
m_ui->dontSlideStickyWindowsBox->setChecked( dontSlideStickyWindows );
|
||||||
capsSelectionChanged();
|
capsSelectionChanged();
|
||||||
|
|
||||||
emit changed(false);
|
emit changed(false);
|
||||||
|
@ -214,6 +217,7 @@ void CubeEffectConfig::save()
|
||||||
conf.writeEntry( "InvertKeys", m_ui->invertKeysBox->isChecked() );
|
conf.writeEntry( "InvertKeys", m_ui->invertKeysBox->isChecked() );
|
||||||
conf.writeEntry( "InvertMouse", m_ui->invertMouseBox->isChecked() );
|
conf.writeEntry( "InvertMouse", m_ui->invertMouseBox->isChecked() );
|
||||||
conf.writeEntry( "DontSlidePanels", m_ui->dontSlidePanelsBox->isChecked() );
|
conf.writeEntry( "DontSlidePanels", m_ui->dontSlidePanelsBox->isChecked() );
|
||||||
|
conf.writeEntry( "DontSlideStickyWindows", m_ui->dontSlideStickyWindowsBox->isChecked() );
|
||||||
|
|
||||||
m_ui->editor->save();
|
m_ui->editor->save();
|
||||||
|
|
||||||
|
@ -243,7 +247,8 @@ void CubeEffectConfig::defaults()
|
||||||
m_ui->walkThroughDesktopBox->setCheckState( Qt::Unchecked );
|
m_ui->walkThroughDesktopBox->setCheckState( Qt::Unchecked );
|
||||||
m_ui->invertKeysBox->setChecked( false );
|
m_ui->invertKeysBox->setChecked( false );
|
||||||
m_ui->invertMouseBox->setChecked( false );
|
m_ui->invertMouseBox->setChecked( false );
|
||||||
m_ui->dontSlidePanelsBox->setChecked( false );
|
m_ui->dontSlidePanelsBox->setChecked( true );
|
||||||
|
m_ui->dontSlideStickyWindowsBox->setChecked( true );
|
||||||
m_ui->editor->allDefault();
|
m_ui->editor->allDefault();
|
||||||
emit changed(true);
|
emit changed(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>700</width>
|
<width>747</width>
|
||||||
<height>566</height>
|
<height>566</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -314,23 +314,10 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" >
|
|
||||||
<spacer name="verticalSpacer_4" >
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0" >
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2" >
|
<item row="2" column="0" colspan="2" >
|
||||||
<widget class="QGroupBox" name="groupBox_2" >
|
<widget class="QGroupBox" name="groupBox_2" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>Zoom</string>
|
<string>Zoom</string>
|
||||||
|
@ -381,7 +368,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2" >
|
<item row="4" column="0" colspan="2" >
|
||||||
<spacer name="verticalSpacer" >
|
<spacer name="verticalSpacer" >
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
@ -394,29 +381,12 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" >
|
<item rowspan="2" row="0" column="1" >
|
||||||
<widget class="QGroupBox" name="groupBox_9" >
|
<widget class="QGroupBox" name="groupBox_9" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>Additional Options</string>
|
<string>Additional Options</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="animateDesktopChangeBox" >
|
|
||||||
<property name="toolTip" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Display the cube when switching desktops</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="dontSlidePanelsBox" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Fix panels while switching desktops</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="bigCubeBox" >
|
<widget class="QCheckBox" name="bigCubeBox" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
|
@ -460,6 +430,58 @@ otherwise it will remain active</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_4" >
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="QGroupBox" name="groupBox" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Animate Desktop Change</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2" >
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="animateDesktopChangeBox" >
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Display the cube when switching desktops</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="dontSlidePanelsBox" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Do not animate panels</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="dontSlideStickyWindowsBox" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Do not animate windows on all desktops</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -501,13 +523,14 @@ otherwise it will remain active</string>
|
||||||
<tabstop>cubeCapsBox</tabstop>
|
<tabstop>cubeCapsBox</tabstop>
|
||||||
<tabstop>capColorButton</tabstop>
|
<tabstop>capColorButton</tabstop>
|
||||||
<tabstop>capsImageBox</tabstop>
|
<tabstop>capsImageBox</tabstop>
|
||||||
<tabstop>animateDesktopChangeBox</tabstop>
|
|
||||||
<tabstop>dontSlidePanelsBox</tabstop>
|
|
||||||
<tabstop>bigCubeBox</tabstop>
|
<tabstop>bigCubeBox</tabstop>
|
||||||
<tabstop>closeOnMouseReleaseBox</tabstop>
|
<tabstop>closeOnMouseReleaseBox</tabstop>
|
||||||
<tabstop>walkThroughDesktopBox</tabstop>
|
<tabstop>walkThroughDesktopBox</tabstop>
|
||||||
<tabstop>invertKeysBox</tabstop>
|
<tabstop>invertKeysBox</tabstop>
|
||||||
<tabstop>invertMouseBox</tabstop>
|
<tabstop>invertMouseBox</tabstop>
|
||||||
|
<tabstop>animateDesktopChangeBox</tabstop>
|
||||||
|
<tabstop>dontSlidePanelsBox</tabstop>
|
||||||
|
<tabstop>dontSlideStickyWindowsBox</tabstop>
|
||||||
<tabstop>zPositionSlider</tabstop>
|
<tabstop>zPositionSlider</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
@ -519,12 +542,12 @@ otherwise it will remain active</string>
|
||||||
<slot>setValue(int)</slot>
|
<slot>setValue(int)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel" >
|
<hint type="sourcelabel" >
|
||||||
<x>386</x>
|
<x>725</x>
|
||||||
<y>175</y>
|
<y>102</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel" >
|
<hint type="destinationlabel" >
|
||||||
<x>235</x>
|
<x>568</x>
|
||||||
<y>162</y>
|
<y>101</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
@ -535,12 +558,44 @@ otherwise it will remain active</string>
|
||||||
<slot>setValue(int)</slot>
|
<slot>setValue(int)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel" >
|
<hint type="sourcelabel" >
|
||||||
<x>133</x>
|
<x>466</x>
|
||||||
<y>162</y>
|
<y>101</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel" >
|
<hint type="destinationlabel" >
|
||||||
<x>386</x>
|
<x>725</x>
|
||||||
<y>175</y>
|
<y>102</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>animateDesktopChangeBox</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>dontSlidePanelsBox</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>147</x>
|
||||||
|
<y>209</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>147</x>
|
||||||
|
<y>232</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>animateDesktopChangeBox</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>dontSlideStickyWindowsBox</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>53</x>
|
||||||
|
<y>209</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>27</x>
|
||||||
|
<y>261</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
|
Loading…
Reference in a new issue