[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kwin-tabbing
From: Jorge Emilio Mata <matamax123 () gmail ! com>
Date: 2009-08-03 16:59:43
Message-ID: 1249318783.435563.23092.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1006389 by mata:
- Added a function to the effects library to know when a tab is
swithced.
- Added a effect to slide a window when the tab is switched.
M +22 -5 clientgroup.cpp
M +6 -0 effects.cpp
M +1 -0 effects.h
M +1 -0 effects/CMakeLists.txt
A effects/slidetabs (directory)
A effects/slidetabs/CMakeLists.txt
A effects/slidetabs/slidetabs.cpp [License: GPL (v2+)]
A effects/slidetabs/slidetabs.desktop
A effects/slidetabs/slidetabs.h [License: GPL (v2+)]
M +4 -0 lib/kwineffects.cpp
M +1 -0 lib/kwineffects.h
M +2 -3 useractions.cpp
--- branches/work/kwin-tabbing/clientgroup.cpp #1006388:1006389
@@ -97,10 +97,10 @@
if( v == shown )
return;
shown = v;
- if( !shown && effects != NULL )
- static_cast<EffectsHandlerImpl*>(effects)->windowTabHidden( \
cl->effectWindow()); + if( shown && effects != NULL )
+ static_cast<EffectsHandlerImpl*>(effects)->windowTabShown( \
cl->effectWindow() ); else if( effects != NULL )
- static_cast<EffectsHandlerImpl*>(effects)->windowTabShown( \
cl->effectWindow()); + \
static_cast<EffectsHandlerImpl*>(effects)->windowTabHidden( cl->effectWindow() ); \
cl->setClientHidden( shown ); }
@@ -160,16 +160,23 @@
{
if( c_id < 1 || c_id > members.count() )
return;
+ if( !shown )
+ {
+ shown_c->goToTabGroupClient( c_id );
+ return;
+ }
ClientList::const_iterator i;
Client* willBeShown = members[ c_id - 1 ];
if( willBeShown == NULL ) // Client doesnt exist
return;
-
willBeShown->clientGroup()->adjustSettings( shown_c->clientGroup() );
-
for( i = members.begin(); i != members.end(); i++ )
(*i)->clientGroup()->setShownClient( willBeShown );
willBeShown->clientGroup()->updateTitleIcons();
+
+ if( effects != NULL )
+ static_cast<EffectsHandlerImpl*>(effects)->windowTabSwitched( \
cl->effectWindow(), willBeShown->effectWindow() ); +
willBeShown->clientGroup()->show( true );
show( false );
}
@@ -178,6 +185,11 @@
{
if( members.count() < 2 ) // No need to move
return;
+ if( !shown )
+ {
+ shown_c->moveTabLeft();
+ return;
+ }
int d = client_id - 1;
ClientList::const_iterator i;
Client *willBeShown;
@@ -199,6 +211,11 @@
{
if( members.count() < 2 ) // No need to move
return;
+ if( !shown )
+ {
+ shown_c->moveTabRight();
+ return;
+ }
int d = client_id - 1;
ClientList::const_iterator i;
Client *willBeShown;
--- branches/work/kwin-tabbing/effects.cpp #1006388:1006389
@@ -267,6 +267,12 @@
ep.second->windowTabHidden( c );
}
+void EffectsHandlerImpl::windowTabSwitched( EffectWindow* from, EffectWindow* to )
+ {
+ foreach( const EffectPair &ep, loaded_effects )
+ ep.second->windowTabSwitched( from, to );
+ }
+
void EffectsHandlerImpl::windowTabGrouped( EffectWindow* from, EffectWindow* to )
{
foreach( const EffectPair &ep, loaded_effects )
--- branches/work/kwin-tabbing/effects.h #1006388:1006389
@@ -148,6 +148,7 @@
void windowUnminimized( EffectWindow* c );
void windowTabShown( EffectWindow* c );
void windowTabHidden( EffectWindow* c );
+ void windowTabSwitched( EffectWindow* from, EffectWindow* to );
void windowTabGrouped( EffectWindow* from, EffectWindow* to );
void windowTabUngrouped( EffectWindow* c, EffectWindow* group );
void desktopChanged( int old );
--- branches/work/kwin-tabbing/effects/CMakeLists.txt #1006388:1006389
@@ -75,6 +75,7 @@
include( taskbarthumbnail/CMakeLists.txt )
include( thumbnailaside/CMakeLists.txt )
include( zoom/CMakeLists.txt )
+include( slidetabs/CMakeLists.txt )
# OpenGL-specific effects
if( KWIN_HAVE_OPENGL_COMPOSITING )
--- branches/work/kwin-tabbing/lib/kwineffects.cpp #1006388:1006389
@@ -159,6 +159,10 @@
{
}
+void Effect::windowTabSwitched( EffectWindow* from, EffectWindow* to )
+ {
+ }
+
void Effect::windowTabGrouped( EffectWindow* from, EffectWindow* to )
{
}
--- branches/work/kwin-tabbing/lib/kwineffects.h #1006388:1006389
@@ -393,6 +393,7 @@
virtual void windowUnminimized( EffectWindow* c );
virtual void windowTabShown( EffectWindow* c );
virtual void windowTabHidden( EffectWindow* c );
+ virtual void windowTabSwitched( EffectWindow* from, EffectWindow* to );
virtual void windowTabGrouped( EffectWindow* from, EffectWindow* to ); // \
from merged with to
virtual void windowTabUngrouped( EffectWindow* c, EffectWindow* group ); // \
c removed from group virtual void windowInputMouseEvent( Window w, QEvent* e );
--- branches/work/kwin-tabbing/useractions.cpp #1006388:1006389
@@ -324,7 +324,7 @@
{
side -= 2;
ClientList::const_iterator i;
- for( i = tabGroupList.begin(); i != tabGroupList.end(); i++ )
+ for( i = tabGroupList.begin(); i != tabGroupList.end(); ++i )
{
if( (*i)->clientGroup()->contains( active_popup_client ) )
{
@@ -349,8 +349,7 @@
ClientList::const_iterator i;
for( i = tabGroupList.begin(), index = 0; i != tabGroupList.end(); i++, index++ \
) {
- if( (*i)->clientGroup()->contains( active_popup_client ) && \
active_popup_client != (*i)
- && !(*i)->clientGroup()->isShown() )
+ if( (*i)->clientGroup()->contains( active_popup_client ) && \
!(*i)->clientGroup()->isShown() ) {
action = move_to_tab_popup->addAction( (*i)->caption() );
action->setData( (*i)->clientGroup()->clientId() + 2 ); // + 2 to avoid \
0 and 1 for left/right
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic