<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>desktopchangeosd.cpp</filename>
    </added>
    <added>
      <filename>desktopchangeosd.h</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -63,8 +63,8 @@ set(kwin_KDEINIT_SRCS
    utils.cpp 
    layers.cpp 
    main.cpp 
-   popupinfo.cpp 
    tabbox.cpp 
+   desktopchangeosd.cpp 
    options.cpp 
    plugins.cpp 
    events.cpp </diff>
      <filename>CMakeLists.txt</filename>
    </modified>
    <modified>
      <diff>@@ -44,8 +44,8 @@ along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
 #include &lt;QtDBus/QtDBus&gt;
 
 #include &quot;client.h&quot;
-#include &quot;popupinfo.h&quot;
 #include &quot;tabbox.h&quot;
+#include &quot;desktopchangeosd.h&quot;
 #include &quot;atoms.h&quot;
 #include &quot;placement.h&quot;
 #include &quot;notifications.h&quot;
@@ -117,7 +117,7 @@ Workspace::Workspace( bool restore )
     , mouse_emulation( false )
     , block_focus( 0 )
     , tab_box( 0 )
-    , popupinfo( 0 )
+    , desktop_change_osd( 0 )
     , popup( 0 )
     , advanced_popup( 0 )
     , trans_popup( 0 )
@@ -227,7 +227,7 @@ Workspace::Workspace( bool restore )
     client_keys = new KActionCollection( this );
     initShortcuts();
     tab_box = new TabBox( this );
-    popupinfo = new PopupInfo( this );
+    desktop_change_osd = new DesktopChangeOSD( this );
 
     init();
 
@@ -343,6 +343,7 @@ void Workspace::init()
 
     loadDesktopSettings();
     updateDesktopLayout();
+    desktop_change_osd-&gt;numberDesktopsChanged();
     // Extra NETRootInfo instance in Client mode is needed to get the values of the properties
     NETRootInfo client_info( display(), NET::ActiveWindow | NET::CurrentDesktop );
     int initial_desktop;
@@ -485,7 +486,7 @@ Workspace::~Workspace()
         ++it )
         (*it)-&gt;release();
     delete tab_box;
-    delete popupinfo;
+    delete desktop_change_osd;
     discardPopup();
     XDeleteProperty( display(), rootWindow(), atoms-&gt;kwin_running );
 
@@ -1032,7 +1033,7 @@ void Workspace::slotReconfigure()
     unsigned long changed = options-&gt;updateSettings();
 
     tab_box-&gt;reconfigure();
-    popupinfo-&gt;reconfigure();
+    desktop_change_osd-&gt;reconfigure();
     initPositioning-&gt;reinitCascading( 0 );
     readShortcuts();
     forEachClient( CheckIgnoreFocusStealingProcedure());
@@ -1426,8 +1427,9 @@ bool Workspace::setCurrentDesktop( int new_desktop )
     //    s += QString::number( desktop_focus_chain[i] ) + &quot;, &quot;;
     //kDebug( 1212 ) &lt;&lt; s &lt;&lt; &quot;}\n&quot;;
 
-    if( old_desktop != 0 )  // Not for the very first time
-        popupinfo-&gt;showInfo( desktopName( currentDesktop() ));
+    // Not for the very first time, only if something changed and there are more than 1 desktops
+    if( old_desktop != 0 &amp;&amp; old_desktop != new_desktop &amp;&amp; numberOfDesktops() &gt; 1 )
+        desktop_change_osd-&gt;desktopChanged( old_desktop );
 
     if( effects != NULL &amp;&amp; old_desktop != 0 &amp;&amp; old_desktop != new_desktop )
         static_cast&lt;EffectsHandlerImpl*&gt;( effects )-&gt;desktopChanged( old_desktop );
@@ -1507,6 +1509,9 @@ void Workspace::setNumberOfDesktops( int n )
     desktop_focus_chain.resize( n );
     for( int i = 0; i &lt; int( desktop_focus_chain.size() ); i++ )
         desktop_focus_chain[i] = i+1;
+
+    // reset the desktop change osd
+    desktop_change_osd-&gt;numberDesktopsChanged();
     }
 
 /**</diff>
      <filename>workspace.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -56,7 +56,7 @@ namespace KWin
 
 class Client;
 class TabBox;
-class PopupInfo;
+class DesktopChangeOSD;
 class RootInfo;
 class PluginMgr;
 class Placement;
@@ -793,7 +793,7 @@ class Workspace : public QObject, public KDecorationDefines
         int block_focus;
 
         TabBox* tab_box;
-        PopupInfo* popupinfo;
+        DesktopChangeOSD* desktop_change_osd;
 
         QMenu* popup;
         QMenu* advanced_popup;</diff>
      <filename>workspace.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>28e7c2e65831ad1af082c9277ee5f68d8b90cfd9</id>
    </parent>
  </parents>
  <author>
    <name>Martin Gr&#228;&#223;lin</name>
    <email>ubuntu@martin-graesslin.com</email>
  </author>
  <url>http://github.com/Zarin/kwin/commit/c0006a4cef0671a8282162c30589c7f5172f0c01</url>
  <id>c0006a4cef0671a8282162c30589c7f5172f0c01</id>
  <committed-date>2009-04-06T09:09:34-07:00</committed-date>
  <authored-date>2009-04-06T09:09:34-07:00</authored-date>
  <message>New on-screen-display for desktop change. It highlights the new desktop and shows arrows from the old to the new desktop. It replaces the popupinfo which only showed the desktop name. Nevertheless keeping popupinfo in svn so if wanted we can add an option to select between osd and popupinfo.
FEATURE: 185799


git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/KDE/kdebase/workspace/kwin@950182 283d02a7-25f6-0310-bc7c-ecb5cbfe19da</message>
  <tree>642f4b355b0746ec0b45af45eaea39d7f6c10248</tree>
  <committer>
    <name>Martin Gr&#228;&#223;lin</name>
    <email>ubuntu@martin-graesslin.com</email>
  </committer>
</commit>
