<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -421,7 +421,12 @@ void PresentWindowsEffect::rearrangeWindows()
 
     if( m_windowFilter.isEmpty() )
         {
-        windowlist = m_motionManager.managedWindows();
+        if( m_tabBoxEnabled )
+            // Assume we correctly set things up, should be identical to
+            // m_motionManager except just in a slightly different order.
+            windowlist = effects-&gt;currentTabBoxWindowList();
+        else
+            windowlist = m_motionManager.managedWindows();
         foreach( EffectWindow *w, m_motionManager.managedWindows() )
             {
             windowlists[w-&gt;screen()].append( w );
@@ -502,8 +507,8 @@ void PresentWindowsEffect::calculateWindowTransformationsClosest( EffectWindowLi
     foreach( EffectWindow *w, windowlist )
         m_windowData[w].slot = -1;
     if( m_tabBoxEnabled )
-        { // Rearrange in the correct order, TODO
-        // rearrangeWindows() is only ever called once so we can use effects-&gt;currentTabBoxWindow()
+        { // Rearrange in the correct order. As rearrangeWindows() is only ever
+          // called once so we can use effects-&gt;currentTabBoxWindow() here.
         int selectedWindow = qMax( 0, windowlist.indexOf( effects-&gt;currentTabBoxWindow() ));
         int slot = 0;
         for( int i = selectedWindow; i &lt; windowlist.count(); i++ )</diff>
      <filename>effects/presentwindows.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fc0f2541ef250d2aedbc847682bebb487d45e9fe</id>
    </parent>
  </parents>
  <author>
    <name>Lucas Murray</name>
    <email>lmurray@undefinedfire.com</email>
  </author>
  <url>http://github.com/Zarin/kwin/commit/f110fe7d6bf1a20f1c3eaab39aefaa108f351e0a</url>
  <id>f110fe7d6bf1a20f1c3eaab39aefaa108f351e0a</id>
  <committed-date>2008-09-22T03:22:07-07:00</committed-date>
  <authored-date>2008-09-22T03:22:07-07:00</authored-date>
  <message>Use correct order for alt+tab switching.</message>
  <tree>32e3cb971f7296290d5977f04af84f224aff4af7</tree>
  <committer>
    <name>Lucas Murray</name>
    <email>lmurray@undefinedfire.com</email>
  </committer>
</commit>
